ampproject / amp-wp

Enable AMP on your WordPress site, the WordPress way.
https://wordpress.org/plugins/amp/
GNU General Public License v2.0
1.79k stars 383 forks source link

New post publish requires new plugin upload #1497

Closed austintude closed 6 years ago

austintude commented 6 years ago

For the post 2 weeks, I've noticed that every time i publish a new post, the AMP plugin fails. By this i mean the landing page and other associated pages no longer go through the amp valodation process. Using the AMP validator chrome extension, I no longer see that the pages are even throwing validation errors and the plugin itself is no longer inserting the amp html necessary ti trigger the extension to check for amp validity. What's more, all built in amp scripts (amp-accordion, amp-img, amp-iframe, etc) are not added top the head of the document so the associated elements in the page are not functuoning. What is required is ti deactivate the plugin (currently betav4), delete it, upload a new plugin and activate it. Once complete the plugin performs as its meant to. Site discussed is bexhale.com

westonruter commented 6 years ago

Please switch to 1.0-RC1 and try with that.

austintude commented 6 years ago

Ive made the shift. I'll let you know if it repeats. Otherwise, no news will equal good news. Should have a new blog to post in 7 days. Thanks

Daniel Bisett - Owner / Developer ~ Austintatious Design

On Tue, Oct 9, 2018, 3:47 PM Weston Ruter notifications@github.com wrote:

Please switch to 1.0-RC1 https://github.com/Automattic/amp-wp/releases/tag/1.0-RC1 and try with that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Automattic/amp-wp/issues/1497#issuecomment-428305605, or mute the thread https://github.com/notifications/unsubscribe-auth/AcXCxVXWntQxNTdUVG-32JYrIgQ47X7Xks5ujO6egaJpZM4XT1NN .

austintude commented 6 years ago

This issue needs re-opening as it is not resolved. Again the website I have the AMP plugin deployed on bexhale.com is not working correctly. The issues are the same as described above: the plugin works on the posts but not on the pages. The website itself was built using WPRig and should be in full native operation out-of-the-box but after every update (or so it would appear) to a post or otherwise, the AMP plugin stops working on the pages. The only solution that I've found to regain full functionality is to deactivate and delete the plugin, then reinstall the plugin and reactivate it. From that point, it functions appropriately until the next post update/creation. (I am currently using the 1.0-RC1 as requested previously.) One thing I'd like to see considered would be an amp-script tree shake of sorts, so I could include all of the amp-scripts in my header.php and then when/if the AMP plugin is activated, it would look for the amp-scripts, shake them and replace them (or leave them) so they don't send a warning flag for existing twice in the same document. This would allow my pages to function properly even if the plugin malfunctions (becuase I have built the page using amp-img, amp-iframe, amp-bind, amp-accordion, etc instead of img and iframe in anticipation of the plugin adding the amp-scripts for me. But like I mentioned, whne/if the plugin doesn't work, my page breaks wherever these items are deployed. Thoughts?

westonruter commented 6 years ago

One thing I'd like to see considered would be an amp-script tree shake of sorts, so I could include all of the amp-scripts in my header.php and then when/if the AMP plugin is activated, it would look for the amp-scripts, shake them and replace them (or leave them) so they don't send a warning flag for existing twice in the same document.

You should not be manually including the AMP component scripts. They will be automatically added based.on whether or not you have an AMP component used in the document.

amedina commented 6 years ago

Following up on @westonruter explanation: the automatic addition of scripts is a design premise of this plugin. Self inclusion of scripts either manually or otherwise should not be done when working with this plugin.

Regarding the issue you are experience, it does not seem to be an issue with the itself plugin. I suggest looking into the actions of other plugins you may have installed, or look into the interactions with WPRig's development workflow to see of there is interference with the behavior of the AMP plugin. If you determine in your debugging that there is an issue, please file it with details so that there is context for triaging the problem.

austintude commented 6 years ago

Roger that. I'll check with Morten (WPRig) to see if there might be a causal relationship and I'll also turn off the various plugins for testing (though this won't likely be performed until after the election, Nov. 6th, when the site will be 'pulled down').

Daniel Bisett - Owner / Developer ~ Austintatious Design

On Mon, Oct 15, 2018, 10:56 AM Alberto A. Medina notifications@github.com wrote:

Following up on @westonruter https://github.com/westonruter explanation: the automatic addition of scripts is a design premise of this plugin. Self inclusion of scripts either manually or otherwise should not be done when working with this plugin.

Regarding the issue you are experience, it does not seem to be an issue with the itself plugin. I suggest looking into the actions of other plugins you may have installed, or look into the interactions with WPRig's development workflow to see of there is interference with the behavior of the AMP plugin. If you determine in your debugging that there is an issue, please file it with details so that there is context for triaging the problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Automattic/amp-wp/issues/1497#issuecomment-429886856, or mute the thread https://github.com/notifications/unsubscribe-auth/AcXCxZT7gb3yDXE6nJnLz8wMGl9usAbkks5ulKIAgaJpZM4XT1NN .

austintude commented 6 years ago

@amedina Alberto et al. I have had an opportunity to play with the plugins. It appears that at least the Cache Enabler by KeyCDN is causing errors. After reactivating, the first repaint of the page after clearing cache gives an AMPed page but with 51 errors. After reloading a second time, the AMP plugin no longer fires and all AMP related elements fail to load.

Is there an alternative method for caching items with or without a plugin that will not cause the AMP plugin to crash? I'm happy to move across. I am only using the cache enabler to ramp up the load speed.

Cheers,

Daniel

On Mon, Oct 15, 2018 at 10:56 AM Alberto A. Medina notifications@github.com wrote:

Following up on @westonruter https://github.com/westonruter explanation: the automatic addition of scripts is a design premise of this plugin. Self inclusion of scripts either manually or otherwise should not be done when working with this plugin.

Regarding the issue you are experience, it does not seem to be an issue with the itself plugin. I suggest looking into the actions of other plugins you may have installed, or look into the interactions with WPRig's development workflow to see of there is interference with the behavior of the AMP plugin. If you determine in your debugging that there is an issue, please file it with details so that there is context for triaging the problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Automattic/amp-wp/issues/1497#issuecomment-429886856, or mute the thread https://github.com/notifications/unsubscribe-auth/AcXCxZT7gb3yDXE6nJnLz8wMGl9usAbkks5ulKIAgaJpZM4XT1NN .

--

Daniel Bisett Owner & CEO Austintatious Design https://austintatiousdesign.co

Connect with me on:

https://www.facebook.com/austintude https://plus.google.com/+LAustinTranslation-Texas https://www.linkedin.com/in/austintude https://twitter.com/austintude https://www.youtube.com/channel/UCWOEzhwo7rUfg_Re8TRvArg

westonruter commented 6 years ago

You should disable that caching plugin for AMP responses, if possible.

austintude commented 6 years ago

I've disabled the plugin. Will it always be a conflict? If so is there an alternative?

Daniel Bisett - Owner / Developer ~ Austintatious Design

On Fri, Oct 19, 2018, 5:06 PM Weston Ruter notifications@github.com wrote:

You should disable that caching plugin for AMP responses, if possible.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Automattic/amp-wp/issues/1497#issuecomment-431513378, or mute the thread https://github.com/notifications/unsubscribe-auth/AcXCxSpLIppr11vDVV0LS3P1hcZequ7Nks5umkz1gaJpZM4XT1NN .

westonruter commented 6 years ago

I don't know. Probably something to check with the plugin author on.