All the editing page is blocked by the age verification page

Topic summary

Age verification overlays (“age gate”) are blocking the Shopify theme editor, preventing users from viewing or editing pages. Multiple users report the issue, noting the age gate still behaves correctly on the live storefront but persists inside the editor, especially in Chrome.

Suggested approaches:

  • Locate age-gate code in layout files (theme.liquid or layout/theme.liquid) and comment it out while editing.
  • Use a Liquid condition to only render the age gate on the storefront (e.g., render the age-gate when the page URL matches the shop’s domain), so it won’t appear in the admin editor.
  • Switch browsers; one user reports Firefox avoids the issue, while Chrome does not.

Recent updates:

  • One user couldn’t initially find the code in Dawn 7.0, then resolved the editor block by commenting out the age-gate section.
  • Their conditional Liquid approach using “{% if page.url contains ‘https://domain.com’ %}” did not prevent the age gate from loading in the admin editor.

Status: No definitive resolution. Conditional URL checks work for some but fail for others; the cause of browser differences and URL detection in the editor remains unclear and unresolved.

Summarized with AI on December 30. AI used: gpt-5.

Every time I am trying to edit my store, the age verification page is always there and I can’t see anything else except this age verification block like below.

I believe I coded this age verification function, but I can’t remember how I did it or how to make sure I can make it goes away when I am editing my store.

Look for the code in your theme’s layout files (theme.liquid or layout/theme.liquid). The code will likely be near the top of the file and may contain words like “age verification”, “age gate”, “age check”, etc. Once you’ve found the code, you can comment it.

I have this same issue, how was it fixed?

1 Like

Hello, I’m having the same problem at the moment - did you manage to find a solution?

Thanks

1 Like

I’m having the same problem too. My age verification code has worked for years, and it still works on the live page. On the editor though, it doesn’t disappear.

1 Like

Has anyone found a way to resolve this?

Ho w was this done please as mine will not go away in the theme editor

Hi there,

When I use Firefox, the problem goes away. It simply isn’t seeming to work in Chrome at all. Best of luck!

Late to the party - but for others..

— when you are editing your sites theme the url becomes - https://admin.shopify.com/store/your-shopify-stores-domain-com, sooo…

{% if page.url contains ‘https://your-shopify-stores-domain.com’ %}
{% render ‘age-check’ %}
{% endif %}

Hi Azam,

I have the same problem where I can no longer edit my site due to the age verification pop up persisting in the editor. This was never a problem in the past, I could always click through. I cannot find any code in the theme.liquid file that references this age gate/check/verification. I am using Dawn 7.0 which is an old version, however, how is the age gate usually set up? I don’t remember it being hard to do.

Thank you,

Karen

Hi Azam,

Update to my previous message:

Commenting out the age-gate section worked as you suggested, however, I would prefer to use the below code (which does NOT work) so that I can edit my theme while not affecting my website visitors.

Why doesn’t this work to prevent loading of the age-gate on https://admin.shopify.com/store/fuegoyhumo/themes/

{% if page.url contains ‘https://fuegoyhumo.com’ %}
{% render ‘age-gate’ %}
{% endif %}