AMP Issue with Global Blocks

Hi,

I was writing in another thread (AMP Issues with Global Blocks), but has been closed (I don´t know why, because my problem persists).

Ok, I had made some tests.

For example, in this post (https://mensandbeauty.com/mejores-cremas-antiarrugas-hombre/) and this (https://mensandbeauty.com/mejores-marcas-cafes-mundo/), I had removed the global blocks, and it works. The AMP page now **is OK and valid **.

So the problem are the global blocks, that are showing a custom Javascript that errors in search console (in the AMP section).

I need a solution with the global blocks issue in AMP pages.

Hey @ignaciosantiago,

Your previous thread was automatically closed by our system because we didn’t receive a response within 10 days.

Your other website which you said does not generate the AMP error also has the empty <script></script> generated by the Global Blocks.

The only difference with your other site with the issue is you didn’t remove the comments in the Global Block’s JS. I’ve mentioned that in the previous thread.

image

Once that’s removed and you’re left with the empty script, that should fix the issue as you said it doesn’t happen in your other site.

If that comment persists even after deleting it, please give us the new access credentials to your site because the one you provided in the other thread doesn’t work.

Thanks.

Hi @christian,

Thanks for the answer.

I had removed that text and left with the empty script, but that hasn´t fix the issue.

That´s why I have made the last test, and is a problem of the Global Block.

Hey @ignaciosantiago,

To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:

Thanks!

Here you have

Hello @ignaciosantiago,

I have compared the link from your other site (https://frenchiemania.com/alergias-alimentarias-en-perros) to your men’s beauty site. I also tested adding a global block in my local test server and the statement does not appear on my end.

//
// No need to add script tags
// here; simply get started
// by writing JavaScript!
// Remember to save your
// changes to see them :)
//

The only difference I can find in your site is Cloudflare. Can you please purge your site cache or at least temporarily disable the Cloudflare so that we can test again? We will also forward this to our developers so that it can be taken closely.

Best Regards.

Hi @ruenel,

I had purged the cache and changed the proxy status to “DNS only” in clouldflare.

Hi @ignaciosantiago,

Amp doesn’t allow any kind of <script> within the body of the content, unfortunately, there is no temporary workaround on this one. But I already added this as a feature request since it’s not a bug, AMP is just another technology or standard that needs integration. Please check this https://stackoverflow.com/questions/36035733/best-way-to-include-custom-javascript-in-amp, https://stackoverflow.com/questions/43748634/add-javascript-in-amp-pages

And it needs <amp-script> as its own standard which currently, another feature that will require integration and not a bug to fix.

Thanks!

Hi @rad,

I don´t know you, but I have this blog with many visits from AMP pages that I am losing every day.

Also, I have many clients with the same problem that are asking for solutions (fast solutions). I had been testing and the global blocks from 3 months to now had changed (I have been with AMP since the beggining and everything worked perfect).

I need a solution, I can just sit and wait, is my business (I hope you understand).

Hi @ignaciosantiago,

I didn’t say we’re stopping there, we’ll continue the investigation and probably feature implementation. What I was saying is this isn’t a bug and there is no immediate fix available, it’s a feature required by AMP and every technological standard always requires something that didn’t come implemented automatically.

I also did some research on my own, and they always said AMP is not a ranking factor, and it has no negative impact on whether there is AMP or none. But again, I’m not saying we’ll ignore it, we have AMP feature requests on our list, and this one is no different.

But I can confirm that AMP is just partially supported by our theme and builder. I also noted and forwarded this issue.

Thanks!

Thanks @rad,

I had been using AMP for years (in many blogs with PRO Theme and other themes), and I can say that is has increased my molbile traffic x2 since I installed it. PRO theme is compatible with AMP, but needs some improvement (this issue with global blocks has happened 3 months ago, with the last update of AMP).

I hope you guys can discover a solution. Now I will have to undo all the global blocks I have in my posts (that are a lot).

Hi @ignaciosantiago,

Please stay tuned for the future updates :slight_smile: . And yes, AMP standard changes over time and it can happen anytime, but we’re always open to any change. I also did initial checking and all CSS/JS from the global block are part of the preview and rendering, removing one or moving one may have negative effect on the builder since all builder (header, footer, content, global block) uses the same implementation. Hence we have to plan this out first.

Thanks for understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.