• Resolved fouriertransform

    (@fouriertransform)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    I can do this with my copy of WordPress just fine, so I suspect that your site is running some kind of security thing, like mod_security or something else.

    dprundle

    (@dprundle)

    Did you ever find a solution to this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable To Use Javascript with Theme Editor’ is closed to new replies.