Support » Plugin: Autoptimize » Autoptimize and JSON-LD Syntax Error

  • Resolved alifeadjacent


    Hi there,

    I’ve been using Autoptimize for a long time and it’s been nothing but helpful. This is the first time I’ve had to ask for help.

    This morning I received a Google notification that one of my blog posts had unparsable structured data. I still have very limited knowledge about these things, so I apologize in advance if this is not accurate – but, it appears that something from Autoptimize is possibly conflicting with my JSON-LD output.

    When I test my structured data in Google’s testing tool, I receive this error: Syntax error: value, object or array expected. And when I click on this error, it jumps to this part of my markup:

    <script type=’application/ld+json’ class=’yoast-schema-graph yoast-schema-graph–main’>var aoDeferInlineJQuery=function()

    I’m not sure if this is supposed to be there or not, but something about it is causing issues.

    When I tested the same blog post in Yandex’s structured data tool, it gave me the same error and referred to the same part of my markup.

    I should also note that I have Autoptimize set to exclude jQuery.

    The link to the affected page is attached. Your help is very much appreciated, and thanks for a great plugin.

    Thank you,

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

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Autoptimize and JSON-LD Syntax Error’ is closed to new replies.