Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Updating jQuery 1.6.2 > 1.7.2 - Seeking help!

phreakphreak MVP
edited June 2014 in Vanilla 2.0 - 2.8

Hi everybody,

I run an instance of Vanilla 2.0.18.11 (and that has a reason, upgrading for 2.1 is underwork).

I want to add a jQuery mobile menu to the site that needs jQuery 1.7.2. And for sure using it breaks some functions of Vanilla and some plugins. My Javascript knowledge is limited and i have no clue what to make to get the broken functions running. I'm a designer and should stay. ;)

Mobile Menu Script - http://mmenu.frebsite.nl/

-
I tried loading both, the core 1.6.2 and with an additional line in the head 1.7.2:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
This gets the best results, although some functions are still broken and of course it's not recommendable to load to jQuery packages.

-
Then i tried versions jumps to figure out which version will be most compatible between my fresh mobile menu and the used functions and plugins of Vanilla. I stupidly added the version numbers. Hihi. ;)
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.5/jquery.min.js"></script>

Well not very smart either.

-
I think there is only one way, and that is to find the most compatible version that makes the mobile menu script working and most of the extensions and the use Firebug to catch all the Javascript errors and try to fix them. OMG, i'd never get that right in 3 months time. ;)

-
1 - So my question is, is there a smart appeal to upgrade 2.0.18.11's jQuery version so i can make most of my Vanilla functions and plugins to and also my mobile menu to work? Maybe some of guys know a way how Javascript warriors are doing this.

2 - Can i call a different jQuery only for the mobile theme than the one in use with the desktop version?

Thanx for hep,
phreak

  • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
  • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Tagged:

Comments

  • Thank you for this hint to noConflict @vrijvlinder‌.

    In my case, especially Button Bar and FileUpload don't work anymore. So i guess i have to dig through an official changelog of the changes of jQuerys iteration between those versions to repair each plugin.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • R_JR_J Admin

    You might have some look with the jQuery migration tool.
    It has been written for changes in jQuery 1.9 and thus might give you some false positives, but I guess it would be the best start if you try to clean up js code.

  • noConfict is mainly for conflicts between different javascript frameworks, like Prototype and jQuery, I am not sure if it would help between different versions of jQuery. And... it is plain stupid to include 2 different versions of jQuery, it will cause more trouble that it will solve. Just include latest jQuery and then look into browser console where problems resides and try to fix that functions.

  • You might check out Sidr here: http://www.berriart.com/sidr/

    Looks to do the same as what you are looking to do and only requires jQuery 1.4.3

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • phreakphreak MVP
    edited June 2014

    @deathbeam: Jep, that is what i'm doing now. But changing the overall jQuery also affects all Vanilla Core Javascripts. So there's a lot of mess for someone like me not so experienced with JS. I'd work trough it step by step also considering 2.1 ways of use of jQuery 1.7.2 with a DIFF-Tool.

    @hgtonight: I'm using SIDR right now on my baby community, but would like to use the mmenu script as it offers more possibilities.

    Thanx ya all, so there is no easy way. I expected it, but i wanted to ask the circle of professionals here. I'll now code into it.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • @phreak I seem to recall @kasper had a project that updated the jQuery library, but I can't seem to locate it right now.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • you may consider, the time it takes to work out all the oddities of changing jquery version to work in vanilla 2.0.18.x, versus the time it will take to modify the forum, theme , and plugins to work with 2.1 (which could be faster, and time better spent).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • phreakphreak MVP
    edited June 2014

    @hgtonight: Thanx i'll wade through @kaspers massive GitHub repositories... and maybe he's smelling our mentions here. :) Maybe it's a project of its own to keep Vanilla at height of recent jQuery releases (that is not meant offensive).

    @peregrine: There are a lot of things hooked into my 2.0.X Version of Vanilla. Believe me i've thought this trough on different levels. ;) I do not only have a community i can hack around and upgrade whenever i want, it does work with CMS-System, a Wiki-System, an AdServer, 2 Apps and so on. Although, i'm preparing 2.1 in the background as well for my community.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • never load more than one version at a time.

    I wrote tutorial on this:
    http://vanillaforums.org/discussion/26755/running-newer-version-of-jquery-1-9-compatability-layer#latest

    grep is your friend.

  • I have refined the tutorial for newbs on themehooks. You basically unload jquery, load the newer jquery, and the capability layer.

    All this no conflict stuff is a distraction. It basically isn't that relevant to this problem.

    grep is your friend.

Sign In or Register to comment.