AMP Issues with Global Blocks

Hi,

2 weeks ago Search Console showed me several issues in some posts where I use global blocks.

Now the issues are in all posts and pages using global blocks.

Ex. https://mensandbeauty.com/mejores-cajas-suscripcion-belleza/amp/
https://mensandbeauty.com/mejores-aplicaciones-para-hacer-ejercicio/amp/
https://mensandbeauty.com/descargar-audio-video-youtube/amp/
https://mensandbeauty.com/ropa-interior-hombre/amp/
https://mensandbeauty.com/productos-mas-vendidos-amazon/amp/
https://mensandbeauty.com/apps-paginas-citas-conocer-gente/amp/
https://mensandbeauty.com/tiendas-belleza-perfumes-online/amp/
https://mensandbeauty.com/tipos-de-zapatos-hombre/amp/
https://mensandbeauty.com/infidelidad/amp/
https://mensandbeauty.com/ver-futbol-gratis-online-en-directo/amp/

I am using AMP for WP premium plugin (in this site and more sites), and this is the only site where global blocks are having problemas with AMP.

What has changed in the last month??? I have been using global blocks in mensandbeauty.com since you launch them and now they are causing a “custom Javascript error” in Search Console.

Why? I need help to solve this, I am loosing traffic.

Hi @ignaciosantiago,

Thank you for writing in, but it seems like you might be having an issue with a third party plugin or script. Regretfully, we cannot provide support for third-party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to Pro will need to be directed to the original developer.

Thank you for your understanding.

Hi,

I am in contact with the AMP plugin developer, and they told me to inform you that the issue is caused by the global block (not the third party plugin).

That´s why I am asking you.

Hi @ignaciosantiago,

I checked the first link that you have shared and also the screenshot you shared. It seems that the AMP console has problems with this code:

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

This seems to be the comment that is there when you check Pro >Theme Options > JS. Also, our Global Block feature has the same option to add Javascript.

Please check them and remove any comment or code you might have there.

The other point is that there is no way we can see if it is related to our Global Block feature or not unless you do the tests below:

  1. Please change the theme from Child Theme to the parent theme and test.
  2. Please disable all third party plugin except the AMP plugin that you use and test.
  3. Add a simple page with your builder and test.
  4. Add a simple Global Block and add it to the page you created in step 4 and test.

Finally, we do not have any guarantee about AMP feature support, if we find there is an incompatibility we will add it into our issue tracker as a feature request. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!

kindly get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case if you still have problems.

Thank you.

Thanks @christopher,

The AMP plugin developers tell me that the problem is that there is an empty script getting added.

It seems to be the message you showed me, but I can´t see anything in my theme options panel:

(I don´t find " Pro >Theme Options > JS " so I can eliminate that text).

Hey @ignaciosantiago,

The following screenshot points where the Theme Option > JS is. I checked and the comment showed by Christopher is not there. The code is in the Content JS.

I’ve removed the comment now but it’s important that you know how the location of Content JS. It’s just above the Save button in the page you’re editing in Cornerstone just like in Theme Options.

image

image

Please also do the same for the Global Blocks you’ve added to your page.

Hope that helps.

Ok,

It seems that it was that text (I don´t where does that text came from).

Thank you very much.

Glad that we could be of help.

Cheers!

Hi again,

I thought it was solved, but the problem still persists.

Any idea?

Hi @ignaciosantiago,

It does add <script></script> where the block is called and it’s normal. Unfortunately, there is no temporary workaround at the moment but I added this to our issue tracker as feature request.

Thanks!

Hi @rad,

Well, the thing is that my traffic comes mainly from AMP, so I need a solution.

Is it possible to speed up that solution?

Hello Ignacio,

Unfortunately we cannot provide a workaround for now because that is something that comes with the Global Block.

However, this is added to our Feature Request list so that our developers can look into it although we cannot provide an ETA when this will be added or if it will be added to a release.

Thank you.

I understand,

But I decided to choose this theme (PRO) because this didn´t happened (until a month ago), and now I need a fix.

The thing is that I need a solution NOW. Do you have an idea to make that script disappear? (until you have a final solution)

Hey @ignaciosantiago,

We understand your concern. However, we really don’t have a workaround. If this didn’t happen in the previous version, you need to revert your site from a previous working state. Your web host might assist with this.

We sorry we can’t do anything about this for now.

Thanks @christian,

Good idea!!! The thing is that we update the web with new content almost everyday, so is difficult to revert to a previous version.

Is it possible to reinstall a previous version of PRO??? Which one do you think it will work without breaking the site?

Hi again,

I had checked another site, where I use the same Theme and the same tool (global blocks) ans there´s no error in search console (https://frenchiemania.com/alergias-alimentarias-en-perros).

Why?

Hi @ignaciosantiago,

I’m not sure about that, would you please get back to us with the login information and URL of the new website that you tested using a Secure Note and give us the name of the Global Block that you used?

I wonder if the blocks that you used are the same? I suggest that you d the tests below:

Original Website:

  1. Add a simple test page.
  2. Add a new Global Block with simple text.
  3. Check for the AMP problems.
  4. Get back to us with the result.

Second Website:

  1. Add a simple test page.
  2. Add a new Global Block with simple text.
  3. Check for the AMP problems.
  4. Get back to us with the result.

This way, we will know if it is something related to the Global Block internal code or your usage that caused the issue.

If you see no problems on the tests, you will need to recreate the Global Block in question, and on each step, save and test the AMP to see what was the problem cause originally.

Thank you.

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