coolgeeklab
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Updating failed. The response is not a valid JSON response.i tried but same result, apparently that’s exactly the problematic tag, even just using the following code return error
<script> //nothing here </script>
- This reply was modified 11 months ago by coolgeeklab.
Forum: Fixing WordPress
In reply to: Updating failed. The response is not a valid JSON response.this is the script i want to add in the post:
<script type="text/javascript">
baseUrl = "https://widgets.cryptocompare.com/";var scripts = document.getElementsByTagName("script");var embedder = scripts[ scripts.length - 1 ];(function (){var appName = encodeURIComponent(window.location.hostname);if(appName==""){appName="local";}var s = document.createElement("script");s.type = "text/javascript";s.async = true;var theUrl = baseUrl+'serve/v2/coin/chart?fsym=BTC&tsym=USD&period=6M';s.src = theUrl + ( theUrl.indexOf("?") >= 0 ? "&" : "?") + "app=" + appName;embedder.parentNode.appendChild(s);})();</script>
the script looks fine, as i paste it in the custom HTML block and click preview, it show up correctly.
The problem only happens when i try to save or publish the post and strangely also by placing into the WPcode snippet , wont display in the page.- This reply was modified 11 months ago by coolgeeklab.
Forum: Fixing WordPress
In reply to: Updating failed. The response is not a valid JSON response.Hi, thanks for your reply.
i have done like you suggested and tried to write the post with the WPcode plugin snippet but script still not showing up, i tried switching theme to see if it might be some theme setting and disabled all plugins but nothing.
I wonder if might be a security setting in wordpress preventing javascript from running.