-
Notifications
You must be signed in to change notification settings - Fork 383
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
Infinite Looping when the AMP plugin is activated #5767
Comments
I assume you have Mobile Redirection turned on? On the non-AMP version of the page, in the Admin Bar click on the "Validate URL" submenu item under the AMP menu. That will take you to a screen that shows any validation issues with the page. Can you share a screenshot of that page? |
It appears you have deactivated the AMP plugin so I can't reproduce the issue right now. |
Hi weston
Thanks for answering.
Really, sorry ... I thought it might take a while to reply and I ended up
disabling AMP.
But now, at this moment, I have AMP enabled. You will be able to see what
happens when we try to access the site in AMP version.
Thank you
…____________________________________
Tito Abreu - Consultor E-commerce
21 3878-9700 | 21 99757-9054
Em qua., 6 de jan. de 2021 às 22:27, Weston Ruter <[email protected]>
escreveu:
It appears you have deactivated the AMP plugin so I can't reproduce the
issue right now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5767 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APXZQE6SCSIUXTBPXJVVEJ3SYUEYLANCNFSM4VYBESUA>
.
|
OK, I'm seeing it now on a Year archive template: https://fullworks.net.br/2020/?amp=1 However, I am also getting an AMP page for a Singular template without the infinite redirect: https://fullworks.net.br/totem-para-alcool-gel-solucao-de-protecao-covid-19/?amp=1 But I'm also getting an AMP page without So it seems that you have a page caching plugin that is ignoring the So we can fix the symptom of the issue by checking that amp-wp/assets/src/mobile-redirection.js Lines 56 to 67 in ac8cfe9
But you'll still need to fix the underlying page caching problem to ensure that AMP pages and non-AMP pages are cached separately. |
The mobile redirection JS being served on your site is the built version, so it is minified. That's why it is different. I'm surprised to see validation errors being attributed to Autoptimize, since that plugin is supposed to short-circuit it's optimizations on AMP pages. For the Wordfence validation errors, I did write a little plugin that avoids the validation errors from being reported: https://gist.github.com/westonruter/3bad77db53496c7103dd64ca1a0e1cf1 Other plugins you may want to consider suppressing on the AMP settings screen if their functionality is completely broken on the AMP version of a page. Regardless, none of these issues are related to the infinite redirection issue. That's apparently due to a caching plugin. |
Hi Weston |
@titoabreurj Suppressing Autoptimize is not having an effect. I'm seeing a non-AMP page at both of these URLs (after first navigating to the non-AMP version):
In contrast, I'm seeing an AMP page at both of these URLs, after first visiting the AMP version:
So again, your page caching plugin is not configured properly to vary caches by the
The validation errors are unrelated to the redirect issue. You'll have to review them to see if the functionality related to them is needed on the page or not. If the functionality still works with the invalid scripts removed, you can leave them as "Removed" and mark the validation errors as Reviewed. If the functionality is broken, then you should instead suppress the plugin from AMP pages. For additional support for configuring the AMP plugin, please instead open a topic on the support forum This issue you opened we'll limit the scope to preventing the infinite redirection symptom you described (but again, the underlying cause has to be fixed in your page caching plugin). |
QA passed With the Autoptimize plugin modified to always cache the non-AMP version of a page, prior to #5775 it can be observed that the page infinitely navigates to the AMP URL: before.mp4And with the fix in place it can be seen that the issue no longer occurs: after.mp4 |
@pierlon So Autoptimize is providing the page caching here? I didn't know that that Autoptimize included page caching, since the its readme states:
But if that's the case, @titoabreurj I recommend opening a support topic with Autoptimize to report that its page caching is failing to vary the cache by the |
Oh no I simply modified the plugin to do so. I attempted to replicate the issue with the (unmodified) WP Super Cache plugin but was unable to do so. |
Hello Can anyone help me identify the problem? |
@titoabreurj Please open a support topic: https://wordpress.org/support/plugin/amp/reviews/#new-post |
Thanxs Westonruter. |
What's the issue?
AMP on Plugin Actived, access the site are the looping.
The homepage and others pages.
I checked with theme developement and the problem persists.
How do we reproduce the issue?
Access the site thoriugh the URL https://fullworks.net.br/?amp on a mobile device and you will see the loop happen!
What browsers are affected?
All browsers
Which AMP version is affected?
Version 2.0.9 and lowers
I'm talking about Brazil. It is now exactly 8:00 pm
Thanks
The text was updated successfully, but these errors were encountered: