Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 798 forks source link

Site Accelerator for static files breaks my theme #17717

Open leandroprz opened 3 years ago

leandroprz commented 3 years ago

Steps to reproduce the issue

  1. Go to this blog post and scroll down to the comments section: https://leandroperez.art/blog/cambia-el-idioma-de-los-programas-de-adobe-sin-reinstalarlos/#comments
  2. Click on Responder to reply to an existing comment.
  3. You should see the reply box below the Responder button, but it is not showing up.

What I expected

I was expecting to see the reply box to appear, instead nothing happens. It was working fine before, not sure when this issue was introduced.

What happened instead

The reply box is not showing up.

Additional information

I disabled Cloudflare cache and my WordPress cache plugin, but they are not causing any issues. The issue is in the Jetpack static files CDN module.

Screenshots

When disabling the Site Accelerator for static files the reply box is appears just fine: https://i.imgur.com/XEEwuNU.png

jeherve commented 3 years ago

Do you happen to be using a JavaScript minifier plugin such as WP Optimize? If so, what happens when you disable that feature on your site? Does it help?

If it does, could you try to check your minify settings and see if you can exclude all JavaScript files using the c0.wp.com domain from being minified?

leandroprz commented 3 years ago

Yes, I'm using that plugin. I disabled the minification feature and also disabled the plugin, but the problem persists.

jeherve commented 3 years ago

When both the plugin and Cloudflare are paused, do you see any JavaScript errors on the page when trying to reply, either when logged in or when logged out?

leandroprz commented 3 years ago

No, I don't see any errors or warnings. Everything listed here is related to Google Ads and an embeded YouTube video: https://i.imgur.com/iGR0SmU.png

jeherve commented 3 years ago

Do you happen to use a plugin that would convert full / absolute links into relative links? In your example post, the links for each comment button are set to #comment-2452, where one would usually see https://leandroperez.art/blog/cambia-el-idioma-de-los-programas-de-adobe-sin-reinstalarlos/?replytocom=2452#respond

<a rel="nofollow" class="comment-reply-link" href="#comment-2452" data-commentid="2452" data-postid="18958" data-belowelement="comment-2452" data-respondelement="respond" data-replyto="Responder a Leandro Pérez" aria-label="Responder a Leandro Pérez">Responder</a>
leandroprz commented 3 years ago

It seems that Rank Math is changing the URL of the reply button. I'm not sure what option is causing that, I'll contact the developer.

I just disabled that plugin and I get this type of URL now https://leandroperez.art/blog/cambia-el-idioma-de-los-programas-de-adobe-sin-reinstalarlos/?replytocom=2601#respond, but JavaScript doesn't work, when I click on a button to reply it reloads the entire page.

jeherve commented 3 years ago

JavaScript doesn't work, when I click on a button to reply it reloads the entire page.

Does it also happen when disabling CloudFlare and / or your minifying plugin again?

leandroprz commented 3 years ago

Yes. I disabled Cloudflare, Rank Math and the cache plugin, it reloads the entire page anyway.

jeherve commented 3 years ago

JavaScript doesn't work, when I click on a button to reply it reloads the entire page.

Does it only happen when Jetpack's Site Accelerator is on? I'm sorry for asking all these questions, but since you use a Premium theme I can't install it on a test site of mine to try things out!

leandroprz commented 3 years ago

I'm sorry for asking all these questions, but since you use a Premium theme I can't install it on a test site of mine to try things out!

Thats okay, I understand how this works.

Does it only happen when Jetpack's Site Accelerator is on?

Yes, only when Site Accelerator for static files is on (with cache plugin disabled, Rank Math disabled and Cloudflare disabled).

leandroprz commented 3 years ago

Here's a fix for Rank Math: https://wordpress.org/support/topic/issue-with-reply-to-comment-button/#post-13691369

Still, I just disabled site accelerator for now. I also noticed my site loads 1s faster and with less requests.

jeherve commented 3 years ago

Would there be a way for you to create a staging site where we could run some more tests to try to debug the issue?

If so, could you contact us via this contact form and mention this GitHub issue? https://jetpack.com/contact-support/?rel=support&hpi=1

Thank you!

leandroprz commented 3 years ago

Sure, no problem. I don't have a server to set up the stage site, but I could share a copy of my website with you. Let me know if that's okay and I'll send you a message via jetpack.com.

jeherve commented 3 years ago

I could share a copy of my website with you. Let me know if that's okay and I'll send you a message via jetpack.com.

That should work, thank you!

leandroprz commented 3 years ago

I just sent the message via jetpack.com

danjjohnson commented 3 years ago

@jeherve see 3517602-zen for the staging site.