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

redirect.html.erb fails silently if JavaScript is disabled #1798

Open
jagthedrummer opened this issue Feb 28, 2024 · 2 comments
Open

redirect.html.erb fails silently if JavaScript is disabled #1798

jagthedrummer opened this issue Feb 28, 2024 · 2 comments

Comments

@jagthedrummer
Copy link

jagthedrummer commented Feb 28, 2024

Issue summary

A user has JavaScript disabled and tries to install an app by going to /login and entering their shop name. After submitting the /login page they just get a blank page and nothing happens.

  • shopify_api version: 13.1.0
  • shopify_app version: 21.6.0
  • Ruby version: 3.2.1
  • Operating system: All

Expected behavior

The user should see an indication that they need to have JavaScript enabled.

Actual behavior

They get a blank screen.

Steps to reproduce the problem

  1. Disable JavaScript
  2. Go to the /login page of an app
  3. Enter a *.myshopify.com domain
  4. Submit the form
  5. See a blank page
  6. View source
  7. See that you've been served the redirect.hml.erb page, which contains only an empty div and a link to a redirect.js script.

Blank page:

CleanShot 2024-02-28 at 10 35 43

View source:

CleanShot 2024-02-28 at 10 35 52

Problem file:

<body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="<%= current_shopify_domain %>" data-host="<%= params[:host] %>" >
<%=
content_tag(:div, nil,
id: 'redirection-target',
data: {
target: {
myshopifyUrl: "https://#{current_shopify_domain}",
url: url,
},
},
)
%>
</body>

@lizkenyon
Copy link
Contributor

Hi there 👋

Thanks for reporting this! I will add this to our backlog.

Though seems like you have taken a deep look at this, we welcome PRs to the repo, so feel free to submit one if you would like and the team would review it promptly. :)

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
@jagthedrummer @lizkenyon and others