• Resolved Muhammad Junaid

    (@mj00712)


    Hi. I hope you are doing well. I am getting AMP Errors in the plugin. The amp test by Google shows that the URLs are valid but the plugin is giving errors. Support UUID: ampwp-0c6598e8-8cbc-568c-9890-3017959ad567

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @mj00712

    Thank you for reaching out to us, As we checked the data you sent, we found out that there might be few validation issues with one of your mu-plugin called notes

    below are the details of validation issues

    {
        "node_name": "script",
        "parent_name": "body",
        "code": "DISALLOWED_TAG",
        "type": "js_error",
        "node_attributes": "{\"data-ampdevmode\":\"\",\"type\":\"text/javascript\",\"src\":\"https://s0.wp.com/wp-content/mu-plugins/notes/notes-common-lite.min.js?ver=__normalized__\",\"id\":\"wpcom-notes-common-js\"}",
        "node_type": "1",
        "error_slug": "07fce933136448b815ea9ea8eb555a5c9646eb12c81fe92bf31b42bed52d4328"
    }

    We will recommend checking with the respective plugin author and to see how you can resolve the validation error.

    Additionally, please check the video below, which will help you understand validation error better

    We hope this helps!

    Thread Starter Muhammad Junaid

    (@mj00712)

    Updated: ampwp-90598f67-1d4d-52cf-ab73-223b6cc31eb6

    I have tried my best to fix the errors. Now there is some issue with the theme(Neve). Although it is amp-compatible it still shows errors for

    [
    {
    "url": "https://filectory.com/people-steel-mills-limited-psmltd-jobs-2024-apply-online/",
    "type": "is_singular[post]",
    "label": "Post",
    "amp_url": "https://filectory.com/people-steel-mills-limited-psmltd-jobs-2024-apply-online/amp/",
    "validation_errors": [
    {
    "node_name": "script",
    "parent_name": "form",
    "code": "DISALLOWED_TAG",
    "type": "js_error",
    "node_attributes": {
    "type": "text/javascript"
    },
    "text": "\n/* /\n(function(){if(window===window.parent){document.getElementById(SINGLE_QUOTED_STRING).name=SINGLE_QUOTED_STRING;}})();\n/ ]]> */\n",
    "node_type": 1,
    "sources": [
    {
    "type": "theme",
    "name": "neve",
    "file": "inc/views/partials/comments.php",
    "line": 39,
    "function": "Neve\Views\Partials\Comments::render_comment_form",
    "hook": "neve_do_comment_area",
    "priority": 10
    }
    ]
    }
    ],
    "stale": true
    }
    ]
    Plugin Support Milind More

    (@milindmore22)

    Hello @mj00712

    As we tested Neve theme, we didn’t locate any validation issues, I will recommend contacting the Neve theme support and check if this is part of their premium feature and if it’s AMP compatible.

    Thread Starter Muhammad Junaid

    (@mj00712)

    Thanks. One other thing I want to know is that Is this the right way of implementing google analytics.

    One more thing I want to know Is this the right way of implementing Google Analytics? Using this code in the head

    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

    and Using this in body

    <amp-analytics type="gtag" data-credentials="include">
    <script type="application/json">
    {
      "vars" : {
        "gtag_id": "G-xxxx",
        "config" : {
          "<TARGET_ID>": { "groups": "default" }
        }
      }
    }
    </script>
    </amp-analytics>

    How can the same be done using AMP plugin analytics option?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AMP Errors’ is closed to new replies.