Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Templates deleted/not pulled with theme commands #5146

Open
2 tasks done
lukecharle opened this issue Dec 27, 2024 · 1 comment
Open
2 tasks done

[Bug]: Templates deleted/not pulled with theme commands #5146

lukecharle opened this issue Dec 27, 2024 · 1 comment
Labels
Type: Bug Something isn't working

Comments

@lukecharle
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

I have two issues related to alt templates, e.g. collection.whisky.json.

  1. Firstly I'm unable to pull down these templates, not sure if its also related to templates that have been created in the customiser. I'm using the following command to pull content down the theme:
shopify theme pull --only config/settings_data.json --only templates/*.json --only templates/customers/*.json --only templates/metaobject/*.json --only sections/*.json --only locales/*.json
  1. When I try doing a push, I'm ignoring all the same as above to ensure nothings deleted, but low and behold it goes and deletes JSON templates when I use this command:
shopify theme push --store=the-bottle-club --ignore config/settings_data.json --ignore templates/*.json --ignore templates/customers/*.json --ignore templates/metaobject/*.json --ignore templates/*.liquid --ignore sections/*.json --ignore locales/*.json

Fortunately have these themes syncing with Github so I can get them back. But this messes up my CI/CD pipeline and it can't be trusted because I'll lose templates on deployments.

Actual behavior

  1. All templates should be pulled down, including the alt templates
  2. JSON Templates should not be deleted because I passed the ignore flag for the templates folder including JSON files.

Verbose output

N/A

Reproduction steps

Pulling scenario:

  1. Create another collection template in the customiser
  2. Try doing a theme pull with shopify theme pull --only templates/*.json
  3. Templates won't be pulled down

Pushing scenario

  1. Push to a theme that doesn't have templates locally but exist remotely
  2. Do a theme push with shopify theme push --ignore templates/*.json
  3. Templates that exist remotely will be deleted

FYI I can't do a --nodelete here as I have to clean up the assets folder.

Operating System

Mac OS 15.1

Shopify CLI version (shopify --version)

3.72.2

Shell

No response

Node version (run node -v if you're not sure)

v20.11.1

What language and version are you using in your application?

No response

@lukecharle lukecharle added the Type: Bug Something isn't working label Dec 27, 2024
@lukecharle
Copy link
Author

lukecharle commented Dec 28, 2024

Just to add more confirmation here, I again have created a new template based off the collection template in the customiser, I have then tried running the following command but nothing is pulled down:

shopify theme pull --only templates/*.json

This is a huge problem and definitely needs to be prioritized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant