Closed anders-christiansen closed 5 months ago
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
Has this issue been solved?
I also wanna know if this has been resolved?
Need to reopen this issue
@anders-christiansen did you ever find a solution?
@Mathias-Givskov
Update:
When pulling contextual files to a Shopify theme with no JSON files, we're encountering an error. This error is because we maintain a single codebase across multiple stores, and we don't push JSON files with store-specific settings. Instead, we pull settings from the live theme during GitHub Actions when pushing changes. Which means when we pull the JSON files from the live theme, the theme we are updating has no JSON files at all.
This is an issue because:
As a result, while the deploy step fails, the theme is pushed to the store, but its missing the contextual files.
To fix this issue, I've implemented a hacky quick fix:
I push in 2 steps:
I dont push contextuals in the first step, so everything except contextuals.
I then perform a second push to the same theme that was just pushed in the previous step, which now contains all the parent files for the contextuals.
This approach works because the second push targets a theme that now contains all the parent files for the contextuals. With parent files, the contextual files can be pushed.
While this solution works, it's admittedly not great. It was a quick fix to avoid spending a lot of time, with the hope that it will be resolved by Shopify.
@nickwesselman @karreiro
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
It should have pulled the theme settings from the theme i tried to pull from.
Actual behavior
It looks like it pulls the contextual files before it pulls the parent files specified in the contextual files, which leads to an error.
2024-01-24T12:52:25.034Z: Completed command theme pull • 12:53:18 ERROR » update templates/index.context.7736b13e-60bd-471f-8c62-64730da78cfd.json: Parent filename 'index.json' does not exist. Please enter a valid filename • 12:53:24 ERROR » update templates/product.accessories.context.7736b13e-60bd-471f-8c62-64730da78cfd.json: Parent filename 'product.accessories.json' does not exist. Please enter a valid filename • 12:53:24 ERROR » update templates/product.accessories.context.dk.json: Parent filename 'product.accessories.json' does not exist. Please enter a valid filename • 12:53:25 ERROR » update templates/product.context.7736b13e-60bd-471f-8c62-64730da78cfd.json: Parent filename 'product.json' does not exist. Please enter a valid filename • 12:53:26 ERROR » update templates/product.grails.context.7736b13e-60bd-471f-8c62-64730da78cfd.json: Parent filename 'product.grails.json' does not exist. Please enter a valid filename • 12:53:27 ERROR » update templates/product.toej.context.7736b13e-60bd-471f-8c62-64730da78cfd.json: Parent filename 'product.toej.json' does not exist. Please enter a valid filename
Verbose output
Reproduction steps
Operating System
MacOS Sonoma
Shopify CLI version (check your project's
package.json
if you're not sure)3.53.1
Shell
No response
Node version (run
node -v
if you're not sure)No response
What language and version are you using in your application?
No response