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

Script Tags are not being registered #1891

Open
5 tasks done
jagthedrummer opened this issue Jul 31, 2024 · 9 comments
Open
5 tasks done

Script Tags are not being registered #1891

jagthedrummer opened this issue Jul 31, 2024 · 9 comments

Comments

@jagthedrummer
Copy link

jagthedrummer commented Jul 31, 2024

Issue summary

Before opening this issue, I have:

  • Upgraded to the latest version of the package
    • shopify_app version: 22.3.2
    • Ruby version: 3.3.2
    • Operating system: MacOS / Linux
  • Set log_level: :debug in my configuration, if applicable
  • Found a reliable way to reproduce the problem that indicates it's a problem with the package
  • Looked for similar issues in this repository
  • Checked that this isn't an issue with a Shopify API

When a shop installs the app the scripttags specified in the initializer aren't registered.

Expected behavior

The scripttags listed in the initializer should be registered.

Actual behavior

They are not registered.

Steps to reproduce the problem

  1. Install an app with scripttags in a new shop.
  2. See that the script tag is not registered.

It looks like maybe something on the Shopify side broke this starting sometime in mid June.

I realize that script tags are deprecated, but all of the info I can find says that they should continue to work until August of 2025.

@matteodepalo
Copy link
Contributor

Hi @jagthedrummer thank you for opening this we can take a look.

@lizkenyon
Copy link
Contributor

Hey there @jagthedrummer!

The script tag manager was removed in version 22. In the upgrading guide you can find our recommendation.

I do see that we still have the scripttags configuration in the shopifyApp object, so I can understand where the confusion is coming from. The team will look into clarifying this.

@jagthedrummer
Copy link
Author

@lizkenyon, I see.

FWIW, as a developer working in the Shopify ecosystem I feel it's pretty unfriendly (bordering on hostile) to purposefully remove working code over a full calendar year before the functionality supported by that code is slated to be dropped.

@lizkenyon
Copy link
Contributor

I think that is very valid feedback. I will share with the team.

@jagthedrummer
Copy link
Author

@lizkenyon Any word on this? It would be great to have the ScriptManager added back since that feature isn't actually deprecated yet.

@jagthedrummer
Copy link
Author

@lizkenyon This issue is also the cause of this issue: #1940

@lizkenyon
Copy link
Contributor

@jagthedrummer
It appears as of February 1st apps are no longer able to create ScriptTags, for the Thank you and Order Status , though current script tags will continue to work until August 28th.

For your use case would it still be helpful to add back the script tag manager?

@jagthedrummer
Copy link
Author

@lizkenyon Yes. It would also be helpful for things not to be removed arbitrarily.

The page you referenced is only for "Thank you" and "Order status" pages. ScriptTags don't appear to be deprecated anymore (at least if they are, it's not mentioned on the API page for them https://shopify.dev/docs/api/admin-rest/2025-01/resources/scripttag) and currently they are the only way to add javascript functionality to vintage themes.

@lizkenyon
Copy link
Contributor

Hey there @jagthedrummer

I received the go ahead to restore the script tag manager functionality.

Please take a look at the PR, you can review the documentation to see if you are good with the functionality

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

No branches or pull requests

3 participants