Skip to toolbar

Find answers, ask questions, and connect with our
community around the world.

Forums Forums Bug Reports Error 500, Error log blocks/content-toggle/block.php Reply To: Error 500, Error log blocks/content-toggle/block.php

  • Alexis

    Member
    October 4, 2020 at 1:29 pm

    Thanks @MoinMollie . That’s bring us a step closer to the fix.

    The outputted strings look normal to me at a first glance. However, any of the following might have caused this error.

    1. Smart quotation marks erroneously replaced straight quotation marks

    To make the function for generating the FAQ schema code work properly, all quotation marks within the string other than the ones you’ve entered yourself should be straight instead of curly. In JSON, quotation marks are used to mark where a string begins and ends.

    This is a straight quotation mark: "
    And these are examples of curly quotation marks: „ “ ”

    If, in the outputted string, the quotation marks around “@type”, “Question”, “acceptedAnswer”, and others are curly ones, we have a problem there.

    2. HTML entities replace quotes

    HTML entities are used for displaying characters that, for whatever reason, may not be rendered directly. Your page, for example, currently uses the codes „ and “ for quotation marks. However, such ways of representing quotation marks for marking the beginning and the end of string values within JSON strings don’t work. The parsing function would also fail if, instead of actual quotation marks, we get codes similar to those ones (whether containing a codename or a number that corresponds to its Unicode value) appear.

    I’ve yet to encounter this issue on my end, but I may be able to make a fix that would fit for your situation. If you view the source code by right-clicking on the page and clicking on “View Source”, you’ll be able to see the underlying characters behind the page.

    //This is what a normal JSON string looks like

    '{"@type":"Question","name":"Worüber will ich schreiben und warum?","acceptedAnswer":{"@type":"Answer","text":""}}'

    Please turn on the FAQ schema again and, this time, check the source code that corresponds to the generated schema code for content toggle block. If it doesn’t look like anything that resembles a normal JSON string, please either (1) take a screenshot and post a link to it, or (2) copy it here but enter it as preformatted text (to ensure that the straight and curly quotes are preserved properly in the post).