Support » Plugins » Hacks » 2x Jquery WordPress = Massive Break

  • Resolved m-one


    I’ve come to the end of my tether, hit despair, and become downright defeated and weak by the problem I’m trying to overcome.

    I’ve searched online, found many resources and tutorials, and to me, they are either not understandable, or simply don’t work.

    I had a great friend of mine build a bespoke form for my site using Jquery 1.8.2 and JqueryUI 1.9.0, I know WordPress 3.5.1 uses Jquery 1.8.3, but lo and behold, my lovely form doesn’t work using WordPress’ seemingly weird Jquery.. so I’ve been looking for a solution to fix this problem.

    Ideally, I would like the Jquery 1.8.2 to be loaded only on the one page with the form, but this is apparently frowned upon.

    Also, just to bring you up to scratch with what I have and haven’t already tried; I’ve tried to both enqueue the scripts into the functions.php, which resulted in breaking wordpress and causing blank white pages, and place the javascripts into the theme header too, which resulted in the all the ajax functions of the wp-admin to break and stop working.

    … :c please help

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator bcworkz


    I find it a little hard to believe that your form is so fragile that a small version difference will break it. Even so, a review of the upgrade notes should point to where the code needs modifying.

    You do need to enqueue your scripts, but blank white pages are unlikely caused by a difference in versions. More likely a silly syntax error. Define the WP_DEBUG constant in wp-config.php as true so you can see what is actually causing the error. Tracking down the white page error is quite likely all that is needed to get your form working.

    If all else fails, for the one page with your form, you may get away with dequeuing the current version and enqueuing the previous version, but you really should be updating your script instead.

    The script was coded by a friend of mine for me, so it’s not like there are regular updates to the code.. that and I haven’t been able to get a hold of him in quite some time.. and the site I’m creating is due to be released shortly..

    I’ve managed to get jquery 1.8.2 loaded into wordpress with help from the debug (Thank you very much bcworkz), so that’s a bonus. Shame the code still isn’t working though. I’ll try the usual, like re-uploading all the necessary files and such.

    Although, finding someone with some javascript knowledge would really help me out. ><;

    Either way, here is the page with the form I am trying to get working:
    Here is what the form should look like.. with all the javascript working:

    Moderator bcworkz


    It appears the jQuery Tabs and Datepicker libraries are not getting loaded. They need to be enqueued much like the jquery code. Same with the time spinners, not sure which UI that is, but it needs to be loaded too.

    Once you track down the various libraries that need to be loaded and get things working, I’ll bet you’ll find you can switch back to the versions installed with WordPress with no issues.

    To my knowledge, they are enqueued the same way as the jquery code. Here’s what is in my functions.php:

    I’ve checked the links to each file on my server and they all seem to be pointing correctly to their locations.

    Moderator bcworkz


    I was looking for specific libraries and did not see them, they very well could be there, I’m not that familiar with how jquery ties things together. If the libraries are there, they do not appear to be called for some reason, because the elements would either be rendered or errors will be thrown. The page does not throw any javascript errors, but something is running in a loop throwing lots of color warnings. I’m wondering if this loop is running prematurely, tying up resources before the page is fully rendered? I’ve no idea where to start tracking that sort of thing down.

    Something is definitely wrong.. I’ve just changed the code in functions.php to depend on jquery, and I’ve also, just to try, asked them to load into the footer, just in case they needed jquery to load first, but the scripts are still loading in the head/and out of order. :c

    So I managed to contact the guy that wrote the script, and after a couple of frustrating moments with WordPress still forcing an earlier version of jquery (1.4.1 apparently), and then writing a hack into the code to only use 1.8.2, the script is finally working.

    I’m sorry I don’t have more details about what went wrong.. it’s still partially a mystery to the both of us, but for now, this topic is resolved.

    Thank you very much for your help bcworkz and thanks for giving it a look too. :3

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘2x Jquery WordPress = Massive Break’ is closed to new replies.