• Resolved Anuj

    (@anujmakhloga)


    Hi,

    I am getting validation errors in plugins……no idea how to resolve it.

    • This topic was modified 3 years, 3 months ago by Anuj.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hi @anujmakhloga,

    Thanks for contacting us, I’m here to help you. I have a look at your website, the home page and the main links at the menu are valid, could share which validation error you are getting and the URL that it is causing the validation error.

    Double check if the plugins that you are using are AMP compatible, here you can check the full list: https://amp-wp.org/ecosystem/plugins/

    I hope that it will help you.

    Thread Starter Anuj

    (@anujmakhloga)

    In homepage and one other url

    Here are the some screenshots of the errors –

    img1

    img2

    img3

    img4

    Hi @anuj

    Thanks for getting back. The screenshots that you sent, most of the plugins are not AMP compatible, that is why you are getting those validation errors.
    But I will go item by item to share some options:

    Contact form 7 is not AMP compatible, but web have an extension to fix this issue: https://amp-wp.org/documentation/extending-amp-compatibility-extensions-and-mini-plugins/

    WordFence is not AMP compatible as well, as Contact form we also have a extension to fix it:
    https://amp-wp.org/documentation/extending-amp-compatibility-extensions-and-mini-plugins/

    Autoptimize, adSense Integration WP QUADS, Insert Headers and Footers, TablePress, WP Content Copy Protection & No Right Click, also are not AMP compatible, for those we don’t have extensions the alternative is looking for a plugin that is AMP compatible to replace them:

    https://amp-wp.org/ecosystem/plugins/

    Or disable AMP for the pages that are using those non-compatible plugins:

    I hope that could help you, if you have any question please let me know.

    Thread Starter Anuj

    (@anujmakhloga)

    Thanks a lot, sir.

    But there is an error for Generatepress (theme) too. And, it does supports AMP. IMAGE

    Contact form and tablepress have no errors in my other AMP-enabled website. Is there any other way to solve this? I can’t remove plugins at the moment.

    All of them have this same Invalid markup

    <script … >

    I have no idea about this, but is it possible that only one wrong thing can create this mess? I was checking an ad plugin a week ago and got some errors, so I deleted that one. Could it be possible that because of that plugin, all these errors occurred? If yes, how to solve/check if everything is fine now?

    Also, there are two errors related to wp-include. How to solve this? wp-includeerror

    Hi @anujmakhloga

    Good to hear some validation errors are fixed now. About Generatepress, lands at the same issue to not be compatible with AMP, at this scenario it will trigger validations issues around different pages, you can enable AMP on reader mode and use a different theme for AMP pages and use a compatible theme or switch to a compatible theme on the following list:

    https://amp-wp.org/ecosystem/themes/

    Thread Starter Anuj

    (@anujmakhloga)

    Sorry, but nothing is solved at the moment. I was telling about one of my other amp-enabled websites which has similar plugins but no issues there, while I am getting errors in the menitoned website.

    Hi @anuj

    I would say sorry for misunderstanding you before. To fix contact form 7 for and WordFence, as mentioned before, are the safest option to fix those issues. Some plugins are partially compatible, it can not trigger a validation error for some special cases.

    But the best scenario is installing an extension to make them work, or disable AMP on those pages that are using those plugins.

    Here you can find a list of extensions available:

    https://amp-wp.org/documentation/extending-amp-compatibility-extensions-and-mini-plugins/

    Here are the instructions to install it:

    https://www.ads-software.com/support/article/managing-plugins/#manual-upload-via-wordpress-admin

    The developer from Generatepress also created a fix to make the theme compatible with AMP:

    https://github.com/tomusborne/amp-for-generatepress

    regarding Autoptimize; it by default is simply not active on AMP-pages, so one could consider it compatible really ??

    Thread Starter Anuj

    (@anujmakhloga)

    Hi,

    I have installed that genereratepress plugin already but still getting errors. And as @optimizingmatters said, it’s not active on AMP pages, so what could be the reason for errors in the plugin? What if I “remove” all those “invalid script” from Autoptimize? invalid scripts in Autoptimize.

    • This reply was modified 3 years, 3 months ago by Anuj.

    ah, but that’s likely because you’re logged in as administrator Anuj, in which case AO adds stuff to the toolbar (top menu). These scripts (toolbar.js and the inline JS) are not added for your normal visitors, you can confirm by testing in an anonymous browser?

    Hi @anujmakhloga,

    Thanks for getting back. Answering your questions about the validation error for script tag, AMP does not allow custom JavaScript, at least in the traditional way. For the plugins to take the benefit of the framework, they need to be compatible with AMP calling those JavaScript properly.

    In this scenario, AMP plugin is not causing the errors, but listing them to help the users fix it. To make pages valid AMP, the AMP plugin removes the disallowed JS and will list it as a warning. The warning in some cases doesn’t mean you have an invalid AMP page, as I mentioned before your home page is valid:

    https://search.google.com/test/amp/result?id=sjlVc6gWmFxY4bYcZzQl4w

    Once those disallowed JavaScripts are removed, you can check if the page behaves as expected without affecting the user experience.

    We can help to find alternatives and solve issues related to the AMP plugin. About themes and the plugins that are not AMP compatible, you should address the issue of the respective developer responsible for those plugins and themes.

    I hope that it clarify your question, if you have any other query please let me know.

    Thread Starter Anuj

    (@anujmakhloga)

    Thank you @fellyph now, I think I get this. Basically I have to reach to every plugin support regarding the issue. I thought this AMP plugin has these issues.

    And, thanks @optimizingmatters for confirming that. [Newbie Alert] So, can I update them as being marked “removed” without any consequences?

    This step, I mean-
    step1
    Step2

    better yet; I just committed a fix to the beta-version of Autoptimize which should prevent the toolbar JS being added on AMP-pages. If you’re up for it you can download the beta from github and install it instead of 2.9.2 to test? ??

    Thread Starter Anuj

    (@anujmakhloga)

    Hi, @optimizingmatters. Thank you A LOT. It’s removed the error. So, Do I have to stick to the beta versions forever?

    Just have another query for you. It’s not related to your plugin, but I hope you can suggest something with this… and I can pass your message to the plugin’s author regarding the similar issue in the amp.

    Here’s the plugin’s error details > img1

    img2

    I reached to the developer, but he said he’s not so good with AMP. Any suggestions will be helpful.

    Hi, @optimizingmatters. Thank you A LOT. It’s removed the error. So, Do I have to stick to the beta versions forever?

    no, I’ll release 2.9.3 soonish, at that point you can disable the beta and re-enable the normal release if you want.

    I reached to the developer, but he said he’s not so good with AMP. Any suggestions will be helpful.

    well, not an AMP specialist either, but the bottomline is that if tablepress detects AMP (see https://github.com/futtta/autoptimize/blob/beta/classes/autoptimizeMain.php#L433-L466 for how AO does that), it should render a light version of the table without any JS.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Validation Error’ is closed to new replies.