• Resolved if_Patrick

    (@if_patrick)


    Hi Sybre,

    first, thanks for the great plugin and the great support that you give for it.

    Yesterday I came along a strange behaviour of our website and I would like to ask you if that is a problem with a feature of the SEO Framework plugin or if it is something else.

    What happened?
    I activated the breadcrumb feature in the SEO Framework plugin, which seemed to work well at first sight. I didn’t check every post or page to see if everything worked fine, so I was surprised to see, that some of the other plugins didn’t work the way they were supposed to be yesterday. We use the Related Posts Pro plugin for example, which displays 15 related posts below every post. Five posts are displayed at a time and after some 20 seconds, another 5 related posts will be shown and so on. The related posts are shown in one horizontal line usually (on our website). But yesterday, all 15 related posts were shown one below the other, so the height of the post was quite large.

    When searching for the source/reason of that behaviour, we came along an error message in the browser console, that stated:
    SyntaxError: unexpected token: ':'

    Looking up the source code, it was this part, that throw the error:
    {&quot;@context&quot;:&quot;<a href="https://schema.org&quot" rel="nofollow">https://schema.org&quot</a>;,&quot;@type&quot;:&quot;BreadcrumbList&quot;,&quot;itemListElement&quot;:[{&quot;@type&quot;:&quot;ListItem&quot;,&quot;position&quot;:1,&quot;item&quot;:{&quot;@id&quot;:&quot;<a href="https://www.microtool.de/&quot" rel="nofollow">https://www.microtool.de/&quot</a>;,&quot;name&quot;:&quot;Erfolgreich. Mit Software von microTOOL!&quot;,&quot;image&quot;:&quot;<a href="https://www.microtool.de/wp-content/uploads/2016/05/Erfolgreich-Mit-Software-von-microTOOL.png&quot" rel="nofollow">https://www.microtool.de/wp-content/uploads/2016/05/Erfolgreich-Mit-Software-von-microTOOL.png&quot</a>;}},{&quot;@type&quot;:&quot;ListItem&quot;,&quot;position&quot;:2,&quot;item&quot;:{&quot;@id&quot;:&quot;<a href="https://www.microtool.de/requirements/&quot" rel="nofollow">https://www.microtool.de/requirements/&quot</a>;,&quot;name&quot;:&quot;Requirements Engineering&quot;}},{&quot;@type&quot;:&quot;ListItem&quot;,&quot;position&quot;:3,&quot;item&quot;:{&quot;name&quot;:&quot;Spurensuche in der Vergangenheit – microTOOL Blog&quot;,&quot;image&quot;:&quot;<a href="https://www.microtool.de/wp-content/uploads/2018/03/spurensuche_share-1.jpg&quot" rel="nofollow">https://www.microtool.de/wp-content/uploads/2018/03/spurensuche_share-1.jpg&quot</a>;}}]}

    That lead us to the conclusion, that it must be the breadcrumbs feature that threw the error, so we deactivated it again to see what happened. And right after deactivating it, everything was fine again. The other plugins (especially the Related Posts Pro) worked well again.

    So my question is:
    Why may be wrong with this code? Why does the browser (Firefox Developer Edition [latest version], Firefox [latest version], Chrome [latest version]) throw these errors, when they way to describe the breadcrumbs should be standard? What do we have to change that the breadcrumbs will not throw those errors?

    Just for your information:
    We make use of other plugins on our website, e. g. WP Rocket, Monarch, Gravity Forms, etc. And our theme is Enfold. But this behaviour also happened on other websites where we installed the SEO Framework with a different theme (Divi by Elegant Themes). They all threw that error and “broke” one or another plugin.

    Any idea of about getting rid of the error is appreciated.

    Best regards,
    Patrick

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter if_Patrick

    (@if_patrick)

    Additional information to my question:

    The breadcrumb feature is deactivated at the moment.
    The screenshot links will expire within 14 days automatically.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @if_patrick,

    The theme elements act weirdly because there’s a scripting error, starting with the JSON-LD markup errors. It’s unrelated yet causal.

    These errors shouldn’t occur, and what you’re experiencing is an isolated issue.
    It’s not an issue with the theme nor the plugins you’ve listed, but it’s highly likely to do with the caching plugin you’re using.

    The rich data scripts are built up like so:

    
    <script type="application/ld+json">...script here...</script>
    

    I presume the caching plugin converts those into JavaScript files, rather than maintaining them to be JSON-LD objects.

    In any case, the output of page https://www.microtool.de/requirements/ should look exactly like this:

    <script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https://www.microtool.de/","name":"Erfolgreich. Mit Software von microTOOL!","image":"ttps://www.microtool.de/wp-content/uploads/2016/05/Erfolgreich-Mit-Software-von-microTOOL.png"}},{"@type":"ListItem","position":2,"item":{"@id":"https://www.microtool.de/requirements/","name":"Requirements Engineering"}},{"@type":"ListItem","position":3,"item":{"name":"Spurensuche in der Vergangenheit – microTOOL Blog","image":"https://www.microtool.de/wp-content/uploads/2018/03/spurensuche_share-1.jpg"}}]}</script>
    

    I believe you can debug and resolve this issue well with the information I’ve given.
    Your website outputs little information regarding the environment it’s in (which is good), so I can’t give you pinpointed directions.

    If you require further assistance, then I’d have to ask you to enable the scripts–preferably in a staging environment–so I can take a closer look.

    Cheers!

    Thread Starter if_Patrick

    (@if_patrick)

    Hi Sybre, thank you very much for pointing me to this direction. I will digg deeper into this now and contact the Caching plugin developer whether they can help on this as well.

    Thanks again and have a great weekend!
    Best regards,
    Patrick

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Breadcrumbs’ is closed to new replies.