• Hi,

    I have a custom block, that stores a JSON string in one of the attributes. When duplicating the post, the escaped qoutes get replaced by simple quotes, which breaks the json parse function.

    Code from the database (original post) like this:

    alt=\"\"

    Gets duplicated (duplicate from database), like this:

    alt=""

    Causing the JSON.parse error on the frontend edit page.
    Which means the copy is not exact.

    Would be great, if you could address this.

    To replicate the error, create a block, that stores a stringified JSON string in a DOM element dataset attribute, like for example data-card-content, and renders the content using the JSON.parse function in JS with map.
    Save the post with the block.
    Duplicate with plugin.
    Attempt to edit the duplicated post
    JSON.parse error within a value

    • This topic was modified 1 year, 1 month ago by blauweb.
    • This topic was modified 1 year, 1 month ago by blauweb.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support duplicatepagesupport

    (@duplicatepagesupport)

    Hi @blauweb,

    Thanks for getting in touch with us. We are glad to assist you.

    Could you please create a screen recording of the issue that you are getting and share the screen recording with us through email at [email protected]?

    We are awaiting your response.

    Regards,
    Duplicate Page Support Team


    Thread Starter blauweb

    (@blauweb)

    Thank you for your reply. I have send the detail to the provided E-mail.

    I am having the same issue when trying to update or customize my theme on my WP website. See screen shots showing the Json_parse_error, when trying to create new text for my Under Construction Page or any customized work that I’m trying to create for my website.

    CC Crying need help

    Plugin Support duplicatepagesupport

    (@duplicatepagesupport)

    Hey @celesmitchell23,

    We hope you are doing great.

    We kindly request you create a detailed screen recording that demonstrates the issue you’re facing. This will enable us to have a clear visual representation of the problem, which, in turn, will help us diagnose and address it more accurately.

    Please share the details with us at [email protected].

    If you have any other questions or further queries, please don’t hesitate to contact us.

    Best Regards,
    Duplicate Page Support Team

    Thread Starter blauweb

    (@blauweb)

    Hi @celesmitchell23,

    I had to change the plugin, because the support team was insisting, that the parse error was not caused by their code, despite showing them screenshots of how their code changes escaped quotes for JSON strings stored in a block prop after duplication, which was the underlying cause of the parse error.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘JSON parse error with custom block’ is closed to new replies.