Support » Fixing WordPress » Javascript Stopped Working

  • Resolved kalel35

    (@kalel35)


    The Javascript on my website stopped working. It “seemed” to coincide with adding MainWP Child and Broken Link Checker Plugin so I deleted those…still no joy.

    http://nationalticketagency.com/buy-arizona-cardinals-tickets

    When I create the page in Html it works fine.

    http://nationalticketagency.com/Java-Test.html

    I even added it to different wordpress install (also 4.2.3) on a different host with no plugins and default theme…..doesn’t work.

    http://firstcoastsurgeons.com/java-test/

    Here is the script:

    <script language="javascript">// <![CDATA[
    var bid= 3179;
    var site =0;
    document.write('<script language="javascript" src="http://tickettransaction.com/… window.location.search.substring(1)+'"></' + 'script>');
    // ]]></script>

    Keep in mind all of this Javascript worked as of 10am this morning, and then suddenly it didn’t. I honestly cannot remember when I upgraded to 4.2.3, so it might be that. Should I just rollback and see if it fixes the issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • That Javascript does not look right to me at all…

    src="http://tickettransaction.com/… window.location.search.substring(1)+'"

    Can you get it again from the source?

    Thread Starter kalel35

    (@kalel35)

    Thanks Colin…the script works just fine. I rolled back to 4.2.2 and it is working as it should.

    And thanks Robert for the reference. I appreciate the heads up. I will wait and see if this is fixed in 4.2.4 before I attempt to go back and fix the code on hundreds of pages.

    Ah I just checked the site and the code was different to what you pasted above, makes sense now.

    Good luck!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I recommend that you don’t revert back to 4.2.2. Versions 4.2.2. and older contain a known security vulnerability.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do you have a lot of posts with various JS embedded into the Text editor? I’m asking because the simple workaround would be to enqueue your JS via a Child Theme. Or to just use a Custom JS plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Javascript Stopped Working’ is closed to new replies.