• Resolved chasndav04

    (@chasndav04)


    When I create a new post, and before I publish it, I always get this error in the AMP Validation:

    {
    "node_name": "script",
    "parent_name": "head",
    "code": "DISALLOWED_TAG",
    "type": "js_error",
    "node_attributes": [],
    "text": "\n\t( function() {\n\t\tvar query = document.location.search;\n\n\t\tif ( query && query.indexOf( SINGLE_QUOTED_STRING ) !== INT ) {\n\t\t\twindow.name = SINGLE_QUOTED_STRING;\n\t\t}\n\n\t\tif ( window.addEventListener ) {\n\t\t\twindow.addEventListener( SINGLE_QUOTED_STRING, function() { window.name = SINGLE_QUOTED_STRING; } );\n\t\t}\n\t}());\n\t\n",
    "node_type": "ELEMENT",
    "sources": [
    {
    "type": "core",
    "name": "wp-includes",
    "file": "functions.php",
    "line": 7596,
    "function": "wp_post_preview_js",
    "hook": "wp_head",
    "priority": 1
    }
    ],
    "removed": true,
    "reviewed": true
    }

    The plugin solves this problem by removing the script (thus the published version shows no AMP errors). Is there a way to solve this problem before publishing? Is it even important if it is being excluded?

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

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

    (@milindmore22)

    Hello @chasndav04

    Thank you for reporting the issue, I am able to reproduce the issue when I try to preview the draft post. I have reported that issue on GitHub.

    For now, you can ignore the error, it will be fixed in an upcoming version of AMP plugin.

    We hope this is helpful!

    Plugin Support Milind More

    (@milindmore22)

    @chasndav04 As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Invalid Inline Script’ is closed to new replies.