-
AuthorPosts
-
October 7, 2024 at 8:55 pm #1468601
We are running into errors when we go to publish page edits
When publishing page edits we get the error: “Updating failed. The response is not a valid JSON response.”
Things we have tried so far:
Updating the theme – the same issues persist
Make sure all plugin are updated – the same issues persist
Deactivating all plugins – the same issues persist
Worked with our host to make sure there were no issues on their end – the same issues persistOctober 8, 2024 at 4:44 am #1468622Hey theminacompany,
Thank you for the inquiry.
Have you tried temporarily deactivating the plugins? It’s possible that one of the plugins is causing the update issue. Please deactivate all plugins one by one to check which one is causing this issue and let us know if this solves the problem.
Best regards,
IsmaelOctober 8, 2024 at 5:50 pm #1468661Yes, as mentioned above, I have deactivated all the plugins and the issues still persists.
October 8, 2024 at 8:27 pm #1468672Hi,
Thanks for the update. Are we allowed to temporarily deactivate plugins for testing purposes?
Best regards,
RikardOctober 8, 2024 at 8:29 pm #1468673Yes, please go ahead
October 8, 2024 at 8:32 pm #1468675Hi,
Thanks for that. I tried updating the front page, but I can’t see the problem there. On which pages are you seeing it?
Best regards,
RikardOctober 8, 2024 at 9:44 pm #1468678This reply has been marked as private.October 9, 2024 at 6:20 am #1468701Hi,
Thank you for the update.
It might be an issue with the embedded code in the Code Block element.
<div class="sked-portal-container" style=""> <iframe id="sked-portal" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin" style="border: none; height: 75vh; width: 100vw; " src="https://portal.sked.life/new-patient?key=sfdsfdsf"> </iframe> <script> (function(){ try { const redirectUrl = "https://blossomfamilychiropractic.com/schedule-appointment/appointment-thank-you-orlando/"; const messageHandler = function(event) { if(event && event.data) { const skedMessage = JSON.parse(event.data); if(skedMessage && skedMessage.actionType === 'confirm') { window.location.href = redirectUrl; } } }; window.addEventListener('message', messageHandler); } catch(err){}; })(); </script></div>
Instead of embedding this code directly to the page, try creating a custom shortcode for it. Example:
function sked_portal_shortcode() { ob_start(); ?> <div class="sked-portal-container" style=""> <iframe id="sked-portal" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin" style="border: none; height: 75vh; width: 100vw;" src="https://portal.sked.life/new-patient?key=sfsfsdfsfssfds"></iframe> <script> (function(){ try { const redirectUrl = "https://blossomfamilychiropractic.com/schedule-appointment/appointment-thank-you-orlando/"; const messageHandler = function(event) { if(event && event.data) { const skedMessage = JSON.parse(event.data); if(skedMessage && skedMessage.actionType === 'confirm') { window.location.href = redirectUrl; } } }; window.addEventListener('message', messageHandler); } catch(err) {}; })(); </script></div> <?php return ob_get_clean(); } add_shortcode('sked_portal', 'sked_portal_shortcode');
You can use this shortcode in Code Blocke element:
[sked_portal]
Please make sure to update the key value in this URL:
https://portal.sked.life/new-patient?key=sfsfsdfsfssfds
Best regards,
IsmaelOctober 9, 2024 at 4:23 pm #1468729This reply has been marked as private.October 9, 2024 at 4:47 pm #1468731Thank you, I tried this and I still am unable to save the page with the shortcode added instead of the embedded code. I also tried saving the page with the custom embedded code block completely removed and that didn’t work either.
October 10, 2024 at 6:43 am #1468762Hi,
Thank you for the update.
We saved the page content as a template, applied it to a temporary page, and removed the embedded code blocks. The issue does not occur on the temporary page. Please check the link in the private field.
Best regards,
IsmaelOctober 10, 2024 at 7:56 pm #1468868Thank you, that did the trick
October 11, 2024 at 4:39 am #1468889 -
AuthorPosts
- The topic ‘Errors when saving page edits – not a valid JSON response’ is closed to new replies.