Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Problem with downloading new "sections" path/folder #216

Open
sarhov opened this issue Sep 28, 2016 · 11 comments
Open

Problem with downloading new "sections" path/folder #216

sarhov opened this issue Sep 28, 2016 · 11 comments

Comments

@sarhov
Copy link

sarhov commented Sep 28, 2016

So, theme download command doesn't download new "sections" path/folder.

firefox_2016-09-28_04-20-39 1

@sarhov
Copy link
Author

sarhov commented Sep 28, 2016

Theme watch doesn't work as well. It says

powershell_2016-09-28_04-29-56 1

@sarhov
Copy link
Author

sarhov commented Sep 28, 2016

I have tried put under whitelist_files, like this

sublime_text_2016-09-28_04-31-19 1

but had the same problem described above.

@charlesemarsh
Copy link

Yea I've noticed this doesn't work, just means I have to edit section files using the online editor!

@valstu
Copy link

valstu commented Oct 26, 2016

I would say this is quite high priority feature. Editing html in admin isn't exactly what you want to do.

@patrick-levesque
Copy link

+1

@cameroncowden
Copy link

Temporary workaround, adds /sections to the default whitelist and rebuilds the gem:
gem uninstall theme
git clone https://github.com/Shopify/shopify_theme.git
sed -i -e 's/assets\//assets\/ sections\//g' shopify_theme/lib/shopify_theme/cli.rb
cd shopify_theme/
gem build shopify_theme.gemspec
gem install shopify_theme-0.0.25.gem

@patrick-levesque
Copy link

Thanks @cameroncowden!! Great workaround! :)

@luongvanphuc
Copy link

luongvanphuc commented Nov 3, 2016

Thanks for @cameroncowden workaround. Alternatively, I did it by:

  • MACOS: Open to file /Library/Ruby/Gems/2.0.0/gems/shopify_theme-0.0.25/lib/shopify_theme/cli.rb. You might have to grant it writable permission (right click > get info > update to Read & Write)
    Windows: the path will look like "C:\Ruby23-x64\lib\ruby\gems\2.3.0\gems\shopify_theme-0.0.25\lib\shopify_theme\cli.rb"
  • Look for the "DEFAULT_WHITELIST" line and add sections/ at the end. This line will look like this:
    DEFAULT_WHITELIST = %w(layout/ assets/ config/ snippets/ templates/ locales/ sections/)
  • Save the file
  • Edit the config.yml to add sections/ into the :whitelist_files:
  • There you go.

@imayolas
Copy link

+1

@jklue
Copy link

jklue commented Nov 15, 2016

Thanks @luongvanphuc. It was nice to see the explanation.

@javihego23
Copy link

+1 Thanks @cameroncowden

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants