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]: Shopify CLI theme push creates 404 preview link #3749

Open
2 tasks done
truecounterfeit opened this issue Apr 18, 2024 · 3 comments
Open
2 tasks done

[Bug]: Shopify CLI theme push creates 404 preview link #3749

truecounterfeit opened this issue Apr 18, 2024 · 3 comments
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working

Comments

@truecounterfeit
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

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?"
Screenshot 2024-04-18 at 8 31 52 AM
Screenshot 2024-04-18 at 8 31 31 AM

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

  1. shopify theme info
  2. shopify theme push --theme "Staging Banner and PDP Message | OD" --unpublished
  3. 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

@truecounterfeit truecounterfeit added the Type: Bug Something isn't working label Apr 18, 2024
@adotterer
Copy link

I'm also experiencing this same issue.

@isaacroldan isaacroldan added the Area: @shopify/theme @shopify/theme package issues label Apr 19, 2024
@karreiro
Copy link
Contributor

👋 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.

@truecounterfeit
Copy link
Author

locales/*
templates/*.json

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

No branches or pull requests

4 participants