• We’re seeing an error in the Google Search Console, under “Search Appearance > Accelerated Mobile Pages”. The error states:

    The text (CDATA) inside tag ‘style amp-custom’ contains ‘CSS -amp- class name prefix’, which is disallowed.

    I’m thinking that the choice of class prefixes has backfired as Google wants to maintain certain css/HTML prefixes for their own proprietary code.

    Anyone have any suggestions on solving this? Am I missing something?

    This issue has also been submitted at GitHub: https://github.com/Automattic/amp-wp/issues/404

    https://ww.wp.xz.cn/plugins/amp/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Would be cool to see an example from your page source of the *actual* code in question. Apologies if that is already on Github 🙂

    Thread Starter steckinsights

    (@steckinsights)

    May have found the issue, and potentially isn’t the plugin’s issue. One of the styles were were referencing was using the “-amp” prefix. We switched the way we were selecting that element and I’m going to watch Google Search Console to see if that changes the way they index the pages and account for errors.

    Ha! That would do it. Ran into that recently on a theme where all the banner classes for featured elements on front page of WooCommerce store had “ad” in them, and so anybody using ad blocker would see blank front page of store.

    Pesky CSS !!! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Google Search Console Requiring different CSS class prefix’ is closed to new replies.