Unable To Use Javascript with Theme Editor
-
I’m completely unable to include any javascript in any of my templates via the Theme Editor, which is really frustrating. I paste in the code – between proper script tags, obviously:
<script type="text/javascript"> <!-- my code goes here //--> </script>
– hit UPDATE FILE, and then I get the theme’s ERROR 404 page, although the URL is still /theme-editor.php.
I can include script via phpMyAdmin, and obviously via FTP if I update the page offline, but then any further edits to that page via the Theme Editor cause the Error 404, because the page contains javascript. I’ve tried CDATA tags, and that doesn’t work either.
This happened in 2.0.5, so I upgraded to 2.3.1 and it’s still happening. The server I’m using has PHP v.5.2.4 and mySQL v.4.1.22
Any ideas?
UPDATE: It’s not necessarily the script itself, I’ve just discovered that it’s the
<script></script>
tags that are causing the problem. The following both produce a 404 error on trying to update the theme file:<script> </script>
<script type="text/javascript"> </script>
Why would script tags be messing things up? It doesn’t make any sense.
- The topic ‘Unable To Use Javascript with Theme Editor’ is closed to new replies.