• Hi,

    I faced this Jason error when I tried to insert a custom html code in the block editor and press update. It happened with a Mastodon-embedded post code this time.

    I then enabled debug mode and got this detialed error during the update:

    The REST API route definition for bluehost/v1/customize-site is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback.

    Can you help me solve the issue?

    Thanks,

Viewing 15 replies - 1 through 15 (of 23 total)
  • I faced this Jason error when I tried to insert a custom html code in the block editor and press update.

    Hi @shapress can you please share the custom HTML code you tried to add to your site and information about what you want to achieve exactly.

    The REST API route definition for?bluehost/v1/customize-site?is missing the required?permission_callback?argument.

    From the above error, it seems like this could be related to your hosting server end of things.

    Thread Starter shapress

    (@shapress)

    Hi, this is the custom HTML code of the Mastodo post:
    <iframe src=_____my post ID____ /embed” class=”mastodon-embed” style=”max-width: 100%; border: 0″ width=”400″ allowfullscreen=”allowfullscreen”>

    Isn’t it probably some conflict with the theme (Astra) or other plugin?
    What should I do if it’s a server-related issue?

    Hi @shapress I was going to check the iframe code on my site to see if it’s conflicting. The iframe you shared doesn’t have all the details but you can troubleshoot on your end to narrow down the issue.

    However, you are right – first to check if it’s a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles. If you can install plugins, install and activate Health Check.

    It will add some additional features under the menu item under Tools > Site Health. On its troubleshooting tab, you can Enable Troubleshooting Mode. This will disable all plugins, switch to a standard WordPress theme (if available), allow you to turn your plugins on and off, and switch between themes, without affecting normal visitors to your site.

    Let me know how that goes.

    Thread Starter shapress

    (@shapress)

    Hi, I haven’t done all the plugin and theme conflict tests yet, but I checked my Mastodon embed HTML code on my other WordPress site, and it doesn’t work there either..
    So, I guess there is some problem with the code?

    That’s weird I’ve seen people embedding Mastodon posts on their sites, why this post (and others of mine I tried) doesn’t work?

    https://docpop.org/2023/01/adding-mastodon-embed/

    Hi @shapress I would suggest checking the iframe code to make sure you grabbed the correct one. I am not sure if this was intentional but the iframe code you shared with me is missing a few things, maybe you can follow the steps shown in the article below about grabbing the embed code for your posts.

    https://docpop.org/2023/01/adding-mastodon-embed/

    Let me know how that goes.

    Thread Starter shapress

    (@shapress)

    Yea, it was intentional, as I didn’t want to expose this specific post on this forum.

    Here is another Mastodon post I’m ok to share (which I also couldn’t embed as HTML code). Please check it on your site and tell me if it works:

    <iframe src="https://me.dm/@shacharpan/110066679727666777/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://me.dm/embed.js" async="async"></script>
    
    
    Moderator Kathryn Presner

    (@zoonini)

    Hi @shapress – I didn’t have any issues adding your Mastodon iframe to a Custom HTML block and saving it on my test site.

    Specs: WP 6.1.1, Twenty Twenty-Three 1.1, no active plugins. Here’s a screencast:

    https://d.pr/v/zhomh0/dVGyu6Kd3r

    Permission issues can sometimes be related to your server’s security settings. A few troubleshooting steps I’d recommend:

    • See if you experience the same issue on a local or remote test site. You can use a free service like this one to spin up a quick remote test site.
    • Contact Bluehost and ask them to have a look and see if anything server-side is blocking the necessary permission callback.
    • To see if there might be a plugin conflict, check whether the issue present with all your plugins temporarily deactivated. You can use the Health Check plugin‘s troubleshooting mode for this, which will not change your live site. If the problem goes away, reactivate your plugins one by one (while still in troubleshooting mode) to find the culprit.
    Thread Starter shapress

    (@shapress)

    Thanks, Kathryn, for your advice.

    I installed the troubleshooting plugin and the issue persists even with the default theme and all other plugins disabled. I also tried to check this problem on the Kinsta sandbox site and it works there as with your site.

    So, from what checked with Bluehost support, I’ve been told there is (on their side I guess) some known technical issue with the Gutenberg editor, and they are working to fix it. In the meantime, they said I should use the classic editor.

    I guess I will not use specific HTML codes like Mastodon embed posts (YouTube HTML code does work for some reason) on the block editor till it is fixed or I change a hosting company.

    Hey @shapress,

    @zoonini sent this issue my way and I’ve confirmed that this is a bug in the custom-site REST controller in our plugin. We’re working on a fix and will have it out ASAP.

    My apologies for any issues that this is causing. I’ll follow up with an update once this is resolved so you can be sure to update if the plugin does not auto-update on its own first.

    Thread Starter shapress

    (@shapress)

    Ok thanks

    Wanted to provide an update on this! An update will be going out this week to fix that notice you are seeing. It’s a valid notice and something we should fix, but I’ve been unable to reproduce the issue described with just the Bluehost plugin active, even using the exact <iframe/> you included above.

    Would you be able to share a list of the plugins you have active on your site and which theme you are using?

    Thread Starter shapress

    (@shapress)

    I don’t think it’s the Bluehost plugin but Bluehost as a server that causes the conflict..

    If you still want the details here they are:

    I use WordPress 6.1.1 with the latest Astra theme, and these plugins.

    Thread Starter shapress

    (@shapress)

    Is there any news with that?

    I tried now to embed a Mostadon post with no success..

    Thanks

    This morning I created a fresh site and did some testing. After each step, I created a new post and inserted a custom HTML block with the <iframe> snippet you included above. These are the scenarios I tested.

    1. Fresh site, default theme (Twenty Twenty-Three used).
    2. Activate Astra theme.
    3. Installed and activated plugins one by one.

    For each step including testing after each plugin was activated, I was unable to reproduce the issue both using the default WordPress post edit screen and the Elementor edit screen (once it was activated).

    This still doesn’t fully rule out all of these plugins. It could have something to do with how you have them configured (I was just using the default configuration set when activating the plugins for the first time).

    Are you able to create a copy of the site in a staging environment where you can deactivate plugins one by one until you can’t reproduce the problem? Most Bluehost hosting plans come with the ability to easily create a staging site for testing purposes.

    Other questions to confirm:

    • Are all plugins and themes up to date?
    • When you see the error occur, is there anything in the Console tab of your your browser’s developer tools?
    • Can you provide exact steps that you are taking to edit a post? For example, are you using the default WordPress editor? Are you clicking the Edit with Elementor option?
    • Can you confirm which block you are using to insert the iframe? Is it the default one that comes with WordPress?
    Thread Starter shapress

    (@shapress)

    Hi Jonathan, and thanks for your thorough try to help.

    I confirm I use the standard custom HTML block of WordPress.

    However, the problem persists even when I disable all plugins and change to the default theme (2023).
    Therefore, I bet it’s some problem with the Bluehost server (not their plugin), and the block editor as debugging mode referred to the issue with Bluehost. I copied the error debug log of that issue in one of the previous posts in this thread. You can check it out.

    I also got a similar Jason error when I tried to add a custom html block in the new widget blocks editor. It was a newsletter form box of Mailerlite. Their support has checked the issue and said that the code was valid. I got this error message in the debug mode: “wp-editor” script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).”

    What I infer from the combination of the two Jason error cases is that it’s something to do with a conflict between the block editors or/and with the Bluehost server or my WordPress core files.

    Oddly, though, some embed formats like YouTube videos and some other custom HTML codes work successfully. For some reason, there is a conflict between the block editors and specific embed formats like signup forms or Mostadon embedded codes.

    What do you think?

    I’d be glad If you had an idea to solve that bearing my last details.

    Thanks again,

    • This reply was modified 1 year, 7 months ago by shapress.
    • This reply was modified 1 year, 7 months ago by shapress.
    • This reply was modified 1 year, 7 months ago by shapress.
Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Updating failed. The response is not a valid JSON response’ is closed to new replies.