• Resolved jass0586

    (@jass0586)


    Hi All,

    There is a error while creating web stories i.e “Custom Javascript is not allowed” Can someone please help me out.

    This is the line where I am getting an error:

    <amp-story-social-share layout=”nodisplay” class=”i-amphtml-layout-nodisplay” hidden=”hidden” i-amphtml-layout=”nodisplay”><script type=”application/json”>{“shareProviders”:[{“provider”:”twitter”},{“provider”:”linkedin”},{“provider”:”email”},{“provider”:”system”}]}

    Best,
    Jay

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hello @jass0586 thanks for getting in touch. This is an AMP validation error which happens when you are using custom JavaScript on your site. This could have been placed manually or it may be added by another plugin. To clear this validation error you will need to remove the custom JavaScript from your site.

    Could you please share the URL for the Story and I’d be happy to take a look and help point out the JavaScript and how it was placed.

    Thread Starter jass0586

    (@jass0586)

    Hello Adam,

    Thank you for getting back to me. We have no idea from where this code is coming.Till last month stories were working fine but from last couple of days we are having this issue. Tried to troubleshoot without any success.

    Here is the url as requested

    https://coinchapter.com/web-stories/cardanos-charles-hoskinson-ethereum-ugly-spat/

    @jass0586 Thanks for sharing the Story URL. When running this Story through AMP validation it passes with no issues. I don’t see any Custom JavaScript errors here: https://search.google.com/test/amp/result?id=GISlYiYAr8KVVmQ4rTuQgA.

    The Story looks good to me. Are you seeing different to this? If yes could you share a screenshot of what you’re seeing?

    Thread Starter jass0586

    (@jass0586)

    The issue shows up in Debug tool when I preview the story. Here is the link https://ibb.co/jMWtmJd

    @jass0586 I can’t seem to get the same when copying your Story data and inputting into the plugin myself. This could be the result of a plugin conflict. Could you please try following the troubleshooting steps here and let me know if the error is cleared while in troubleshooting mode.

    If you are still seeing it after this could you please share your Site Health Information using this private form and I can check your setup.

    Thread Starter jass0586

    (@jass0586)

    Ok. Thank you. I’ll get back to you asap.

    Thread Starter jass0586

    (@jass0586)

    Hi Adam,

    I have passed the information to our development team. Meanwhile I was troubleshooting the error and I found out it might be because of Ezoic. I have attached screenshots for the same. Please look into the code and share your thoughts.

    https://ibb.co/XXdXs6p
    https://ibb.co/tpvpn67

    Thread Starter jass0586

    (@jass0586)

    @adamdunnage one more issue crops up HTTPS is invalid and prevent it from being indexed. Here is the url. Please see the screenshot. https://ibb.co/4tKKYt4

    Thread Starter jass0586

    (@jass0586)

    @adamdunnage This is the reply I got from my developer. Do you think error it will not cause any problem?

    Again… This is a non-issue. The plugin that was causing it is the “Shortpixel AI” image resizer that fixes some page speed issues due to image sizes. This added some javascript but I disabled it using another plugin specifically for the “Web Stories” post-type which it can only target once the story is published.

    As you can see, the error does NOT exist in any published Web Story. However, the error will be there in a non-published (DRAFT) Web Storie as this is how the plugin that disables other plugins works.

    In other words, An error in the Drafts doesn’t matter at all since they are not publicly facing so he can move on and ignore this issue.”

    @jass0586 Thanks for the added information that’s all very helpful. The reply from the developer is exactly right. There is no concern for the drafts and your Live Stories are not failing AMP validation so there is no problem here.

    As for the HTTPS issue you raised earlier, this is actually related to a Google Search update and isn’t from the Web Stories plugin itself. It could indicate that your URL has not been indexed yet and Google does not yet know if it has valid HTTPS. Once the URL has been indexed, the message could go away or it may find that HTTPS is invalid.

    Please note that as indicated in this article, Google is aware this message may be confusing and will be updating that message.

    Thread Starter jass0586

    (@jass0586)

    @adamdunnage But our web stories are not ranking now and we are not getting any traffic. Also, this error was not in the past when we saved our stories in draft.

    @jass0586 Unfortunately, we can only assist you with help and troubleshooting for the Web Stories plugin itself. Any issues relating to traffic drops fall out of the scope of this support forum. You can find more information on this in our pinned notice here.

    Thread Starter jass0586

    (@jass0586)

    @adamdunnage Ok. That I can understand. I will share the health report tonight with you. Also, did you got a chance to look at the screenshots of Ezoic that I have shared above?

    @jass0586 If Ezoic is causing a conflict or placing JavaScript on your site then you will need to work with the Ezoic team on that. But as mentioned previously, your Stories are valid and passing AMP validation so there are no issues to worry about.

    Thread Starter jass0586

    (@jass0586)

    @adamdunnage I am not sure about that. That’s why I am asking for your help. I have no experience in Ezoic and web stories. I just read about Ezoic in this forum and saw our website has also Ezoic implementation. Other than that I have no experience in fixing this. And what should I say to Ezoic?

    Will share the Health status report as well by tonight.

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘Custom javascript is not allowed error in web story’ is closed to new replies.