Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Luckyna San

    (@luckynasan)

    Hello, thanks for your topic. I tested your story URL in the AMP test tool and it appears the offending line of code is related to the <style data-px-verified-tag> tag that was added to the head of the document which is not allowed.

    Please note that generally AMP validation errors are usually caused by other?plugins, so the easiest way is to simply manually temporarily?disable?all other?plugins?(and changing the theme) for a couple of minutes. That’s the quickest way to isolate the issue.

    Thread Starter alessandroemerich

    (@alessandroemerich)

    Hi Luckina,

    We have few plugins in our WordPress. We host with WPVIP (Automattic) and there is strict control over the use of plugins. We tested deactivating the few plugins we have to see if the problem would be resolved, but the error did not change.

    When searching for “data-px-verified-tag“, which attribute of the style tag presents the problem, we only found it in 4 places, considering the “wp-content” folder.

    AMP Plugin

    • /wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php (line 954, in comment)
    • /wp-content/plugins/amp/src/ValidationExemption.php (line 42, constant set to this value)

    Web Stories Plugin

    • /wp-content/plugins/web-stories/third-party/vendor/ampproject/amp-wp/includes/sanitizers/class-amp-style-sanitizer.php (line 769, in a comment identical to the AMP plugin comment. )
    • /wp-content/plugins/web-stories/third-party/vendor/ampproject/amp-wp/src/ValidationExemption.php (line 40, constant set to this value identical to the AMP plugin)

    Could you help us by explaining how the Web Stories plugin uses this tag so we can try to see if we can help with the solution?

    Plugin Author Pascal Birchler

    (@swissspidy)

    The data-px-verified-tag existence is a bit misleading.

    This is added by the AMP / Web Stories plugin typically only when another plugin disables its stylesheet processing. When that happens, those stylesheets are marked as “verified”, thus leading to such validation errors. Are you perhaps filtering amp_content_sanitizers or web_stories_amp_sanitizers on your site to set the disable_style_processing flag on the style sanitizer? If so, that explains it.

    Thread Starter alessandroemerich

    (@alessandroemerich)

    Hi Pascal,

    You nailed it. In our theme we do this for the AMP plugin, since our theme uses Tailwind. I looked for the point you mentioned and put it so that, in cases of CPT Web Stories, it doesn’t change the default behavior. That worked.

    The strange thing is that this had never given an error, even for web stories, but it started to happen out of nowhere. One day it started complaining in Google’s Search Console and we didn’t understand the cause. I don’t know if there’s anything you can tell us that could give us an idea. I ask this because if we know the cause, we can foresee more future problems.

    Thanks again.

    Plugin Author Pascal Birchler

    (@swissspidy)

    The strange thing is that this had never given an error, even for web stories, but it started to happen out of nowhere. One day it started complaining in Google’s Search Console and we didn’t understand the cause. I don’t know if there’s anything you can tell us that could give us an idea. I ask this because if we know the cause, we can foresee more future problems.

    It might have to do with the specific versions of the AMP plugin and the Web Stories plugin you are using. Both have the same underlying AMP library, and we use whichever is newest. And depending on the version, either web_stories_amp_sanitizers or amp_content_sanitizers is used. So I assume it has to do with one of the two plugins being updated recently.

    Anyway, glad to hear you were able to find the issue!

    Thread Starter alessandroemerich

    (@alessandroemerich)

    I understood. Thank you very much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP 6.5.2 – Error attribute ‘amp-custom’ is missing in tag ‘style amp-custom’’ is closed to new replies.