Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Frank Goossens

    (@futtta)

    the json+ld indeed contains something that should not be in there;

    <script type=”application/ld+json”><!–[if IE]><![endif]–>{
    “@context”: “https://schema.org&#8221;,
    “@type”: “WebSite”, “name”: “洪氏风水”, “potentialAction”: {
    “@type”: “SearchAction”,
    “target”: “https://fengshuimaster8u.com/?s={search_term}”,
    “query-input”: “required name=search_term”
    }, “url”: “https://fengshuimaster8u.com/&#8221;
    }</script>

    But I doubt this is autoptimize; when going to https://fengshuimaster8u.com/?cache=busted (to make sure we get a nice fresh page), the IE-conditional is gone and the page validates.

    conclusion: empty your page cache and all should be fine.

    enjoy you sunday!
    frank

    Thread Starter Quan88

    (@quan88)

    Hi Frank,

    I have actually activated and deactivated your plugin few times. When it is active, there is error, when deactivated, error is gone. Even clearing all caches. If you need I can send you the screenshots.

    Do you think this is a plugin conflict?

    Is it anyway serious or it can be ignored?

    Thanks in advance

    Plugin Author Frank Goossens

    (@futtta)

    no idea what is going on really;
    * when busting cache the error is gone, cfr. https://developers.google.com/structured-data/testing-tool?url=http%253A%252F%252Ffengshuimaster8u.com%252F%253Fcache%253Dbusted (go to https://fengshuimaster8u.com/?cache=busted to see the page source which includes autoptimize and does indeed have correct ld+json code
    * AO doesn’t do anything that would cause this, scripts are only taken into account if they don’t have type specified or if type=”text/javascript”, so it leaves application/ld+json quietly in place really.

    based on this I can only suspect some other plugin (or your theme) messing things up, maybe conflicting with AO.

    if this is serious or ignored: would not think this to be too serious really, although it is not ideal.

    frank

    Thread Starter Quan88

    (@quan88)

    I have disable all minification and caching. Both Autoptimize and WPRocket. No errors. Since it is not minified. Can you see the reason for it?

    Thanks in advance

    Plugin Author Frank Goossens

    (@futtta)

    Afraid not Quan88; the non-optimized page doesn’t contain <!--[if IE]><![endif]--> anywhere.

    I’m pretty convinced by now this isn’t due to Autoptimize actually, as;
    * AO ignores scripts that aren’t javascript (this one is application/json+ld)
    * AO ignores conditional comments (such as <!–[if IE]><![endif]–>) and never adds them
    * the error was gone on the cache-busted version, which did have the CSS/JS optimized

    Have you tried with Autoptimize but without Cloudflare?

    frank

    Thread Starter Quan88

    (@quan88)

    Hi Frank,

    I found out the problem. Autoptimize conflict with WP-Rocket. So should I raise this issue with you or WP-Rocket?

    Thanks & regards,

    Plugin Author Frank Goossens

    (@futtta)

    well, wp rocket is a pay-for solution, which implies 2 things:
    * I can’t test myself
    * You pay for support

    so you should take it up with them (but don’t let them off the hook by just telling you to ditch AO, which would be the easy, to-be-expected answer). do keep me posted on this!

    frank

    Thread Starter Quan88

    (@quan88)

    Ok. Their support requested me to disable HTML minification from Autoptimize. Enabled their HTML minification instead. So far no error for JSON-ID after doing those.

    Thanks for all your earlier help.

    Plugin Author Frank Goossens

    (@futtta)

    Their support requested me to disable HTML minification from Autoptimize. Enabled their HTML minification instead.

    that is a nice workaround, but it doesn’t address the root cause that they insert the IE-conditional if AO does HTML minification. but it works now, so … ??

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