Replies: 0
We have Toc plus plugin activated on our WordPress dashboard, we also have Qubley Gutenberg Blocks plugin installed.
The Qubley Gutenberg Blocks plugin: https://wordpress.org/plugins/qubely/
whenever we try to add the [toc] shortcode on our Qubley blocks page we get the following error.
“Updating failed. Unexpected token < in JSON at position 2”
Also, we observed the following script is being added into the Gutenberg’s post request’s response when we update the page:
This script is part of Qubley plugin, but this only interferes when we use [toc] shortcode inside the page.
So we understood that this is conflict and toc plus plugin is doing something which triggers it.
you can find the screenshot here: https://i.imgur.com/qAYEEjK.png
<script>
function loadScriptAsync(src) {
return new Promise((resolve, reject) => {
const tag = document.createElement(‘script’);
tag.src = src;
tag.async = true;
tag.onload = () => {
resolve();
};
const firstScriptTag = document.getElementsByTagName(‘script’)[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
});
}
</script>
So we wanted to know if you can look into it if it’s causing from your plugin.