Support » Plugin: Copyright Proof » Not a valid AMP page

  • Resolved nikana2000

    (@nikana2000)


    Google is determining pages using Copyright Proof are not AMP compliant.

    “Prohibited or invalid use of HTML Tag.”
    “The attribute ‘xml:lang’ may not appear in tag ‘span’.”

    Here’s what it looks like in use…
    “<span id=”dprv_cp-v3.06″ xml:lang=”en” class=”notranslate”><amp-im…”

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DigiproveDevelopment

    (@digiprovedevelopment)

    Hi Nikana,

    Thanks for letting us know, we did not realise there was a non-compliance. We will address this in next release (over holiday period).

    Plugin Author DigiproveDevelopment

    (@digiprovedevelopment)

    Hi Nikana,
    Managed to check that out for you. I don’t think this is an error in Copyright Proof. It is writing the lang=”en” attribute to make the Digiprove Notice work correctly inside pages written in other languages. In your installation, the “lang” is changed to “xml:lang” probably by another plugin that probably is configured to work with xml documents rather than html documents.

    To Solve: deactivate other plugins one by one until the problem disappears. Please let us know how you get on and if you need us to look into it further.

    Thank you for the suggestion. I toggled ~30plugins; only Copyright Proof affected the “xml:lang” attribute which is isolated to the line of code for the plugin. I’m pretty sure it’s isolated to this plugin.

    I look forward to your next release, and offer my support that you may find beneficial.

    Plugin Author DigiproveDevelopment

    (@digiprovedevelopment)

    Hi Nikana,

    We’ll have to dig further so. Are you using the AMP plugin from Automattic? Our plugin is tested with that.

    I’ve toggled Automattic’s AMP, and Google AMP Test determines the “Page cannot be reached”.

    Is there a way to keep your plugin from inserting the xml:lang tag?

    • This reply was modified 2 years, 6 months ago by nikana2000.
    • This reply was modified 2 years, 6 months ago by nikana2000.
    Plugin Author DigiproveDevelopment

    (@digiprovedevelopment)

    Hi Nikana,

    Short answer is yes, but let me explain:

    To be fully AMP-compatible, our plugin has to stick to the rigid rules of AMP, and the result is some loss of functionality (e.g. copy-protection not as strong, positioning of notice not optimal). So we have designed the plugin to work differently with AMP pages than non-AMP pages, thus giving the best of both worlds.

    For non-AMP pages we do include xml:lang attribute in order to meet W3C recommendatios (https://www.w3.org/International/questions/qa-html-language-declarations)

    For AMP pages we strip that out because (as you know) Google considers it to be non-AMP compliant.

    We use a function of Automattic AMP called is_amp_endpoint to decide whether this is an AMP page or not, and this affects the behaviour of our plugin.

    If you want to use our plugin without Automattic AMP, you can opt to

    a) modify it by removing the text '" xml:lang="' . $lang . from the file “copyright_proof_live.php”

    or b) include a php function “is_amp_endpoint()” which returns true

    We are open to enhancing the plugin to work in other situations but we have really not had any demand from users to date.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Not a valid AMP page’ is closed to new replies.