• Resolved Lo?c Parent

    (@lowick)


    Hello,
    I encounter an issue with Gutenberg. When I go to the edit page, The page loads without any issue but I can’t see the blocks. Instead of it, I see a kind of JSON string with surrended by an html comment.

    This seems to appear only in the production environment of the site which is working with CloudFront. When I try to backup and install it on my local environment, it works as expected.

    I tried to disable all the plugins and switch to the default theme but no change.

    Could someone help me with this?
    Is it about a server or CloudFront configuration or maybe about the database?

    Thanks for your help,
    Lo?c

Viewing 1 replies (of 1 total)
  • Thread Starter Lo?c Parent

    (@lowick)

    I just found a workaround that fix this issue by adding the action code in the file “functions.php”:

    function richedit_wp_cloudfront () {
       add_filter('user_can_richedit','__return_true');
    }
    
    add_action( 'init', 'richedit_wp_cloudfront', 9 );

    So, it solves this issue but I don’t understand why I have to add this code while it works without on my local environment.

    Thanks,
    Lo?c

    • This reply was modified 1 year, 9 months ago by Lo?c Parent.
Viewing 1 replies (of 1 total)
  • The topic ‘Json is displayed instead of blocks’ is closed to new replies.