[Bug]: Shopify CLI theme push creates 404 preview link
Please confirm that you have:
- [X] 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.)
- [X] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
Theme
Expected behavior
shopify theme push should output a preview link that reflects the theme
Actual behavior
shopify theme push outputs a Warning "Warning: The pattern 'templates/.json' does not include subdirectories. To maintain backwards compatibility, we have modified your pattern to templates/**/.json to explicitly include subdirectories."
Then opening the generated preview links the homepage says "404 Not Found. The page you were looking for does not exist. Maybe you want to try the search instead?"
Verbose output
╭─ success ────────────────────────────────────────────────────────────────────╮
│ │
│ The theme 'Staging Banner and PDP Message | OD' (#128675643457) was pushed │
│ successfully. │
│ │
│ Next steps │
│ • View your theme [1] │
│ • Customize your theme at the theme editor [2] │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
[1] https://alencorp-2.myshopify.com?preview_theme_id=128675643457
[2] https://alencorp-2.myshopify.com/admin/themes/128675643457/editor
2024-04-18T15:38:01.723Z:
Running system process:
· Command: ruby -v
· Working directory: /Users/kelati/Alen-Shopify-2.0
2024-04-18T15:38:01.989Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 136 ms
With response headers:
- x-request-id: f0f68756-790a-4ed5-8d71-1b2d74459fa5
2024-04-18T15:38:01.990Z: Analytics event sent: {
"command": "theme push",
"time_start": 1713454559445,
"time_end": 1713454681713,
"total_time": 122268,
"success": true,
"cli_version": "3.59.0",
"ruby_version": "3.3.0",
"node_version": "21.7.3",
"is_employee": false,
"uname": "darwin amd64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "[\"@shopify/cli\"]",
"env_shell": "zsh",
"env_device_id": "46d98524b915e39c8bf95672291983958eea459e",
"env_cloud": "localhost",
"env_package_manager": "unknown",
"env_is_global": true,
"cmd_all_timing_network_ms": 121569,
"cmd_all_timing_prompts_ms": 0,
"cmd_all_launcher": "unknown",
"cmd_all_topic": "theme",
"cmd_all_plugin": "@shopify/cli",
"cmd_all_force": false,
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "644d45f6e9658a1149d2c259b57fafc92e2c8c0a",
"cmd_all_timing_active_ms": 698,
"cmd_all_exit": "ok",
"args": "--theme Staging Banner and PDP Message | OD --unpublished --verbose",
"env_plugin_installed_all": "[\"@shopify/cli\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2024-04-18T15:38:01.990Z: Completed command theme push
Reproduction steps
shopify theme infoshopify theme push --theme "Staging Banner and PDP Message | OD" --unpublished- open preview link
Operating System
Mac OS 14.2.1
Shopify CLI version (check your project's package.json if you're not sure)
3.59.0
Shell
zsh
Node version (run node -v if you're not sure)
v21.7.3
What language and version are you using in your application?
3.3.0
I'm also experiencing this same issue.
👋 Hey @truecounterfeit and @adotterer,
I'm Guilherme, from Shopify. This issue seems likely related to a regression in the module that ignores files based on .shopifyignore . Thus, changing the patterns to a regex or a glob pattern may provide a workaround for this issue.
Could you please share your .shopifyignore files? If you prefer not to share them in this thread, please feel free to submit them here.
Thank you for reporting this issue.
locales/* templates/*.json
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.