WordPress.org

Ready to get started?Download WordPress

Forums

Nivo Slider for WordPress
Stop Loading jQuery Incorrectly (12 posts)

  1. dcblog
    Member
    Posted 2 years ago #

    Nivo slider is incorrectly loading jQuery from its own source

    THIS IS CAUSING ALL OTHER JQUERY PLUGINS TO BREAK

    Please correct this ASAP and use the correct enqueue_scripts method to load jQuery

    http://wordpress.org/extend/plugins/nivo-slider-for-wordpress/

  2. pyryk
    Member
    Posted 2 years ago #

    +1 for this.

    I modified the plugin to do js loading correcly. Here is the patch/diff file for my modifications: http://dl.dropbox.com/u/328788/nivoslider4wp_enqueue_scripts.patch. Works for me, but it might not conform to other wp standards or be otherwise imperfect as I'm not an experienced wp developer. Feel free to send suggestions or improve it.

    For the original developer, could you apply the patch to the plugin code so that this issue gets fixed?

  3. tafkanator
    Member
    Posted 2 years ago #

    I changed code too. Please update it in next version or it will break other stuff again after update

  4. leefitzgerald91
    Member
    Posted 2 years ago #

    What are you suppose to do with the Patch?
    i am having the same jquery problems.

  5. andycheeseman
    Member
    Posted 2 years ago #

    Hi,

    How would I manually change this code? I'm experiencing the same problems as the others in this thread.

    Thanks,
    Andy.

  6. pyryk
    Member
    Posted 2 years ago #

    I noticed that in my patchfile there were my wordpress installation specific paths that may have made the script not work. I changed the paths to not include the wordpress root folder.

    leefitzgerald91:
    If you're running Unix, you could apply the patch by downloading the (updated) patch file to your wordpress root folder and running the patch file with
    patch -p0 < nivoslider4wp_enqueue_scripts.patch
    There should be a Windows port of patch also (google patch windows), but I think it might be easier to apply changes by hand (see next section).

    andycheeseman:
    The patch file is a regular diff file (http://en.wikipedia.org/wiki/Diff#Unified_format). In this case:
    1) create a file wp-content/plugins/nivo-slider-for-wordpress/js/nivoSlider4wp.js (defined by line 5 in patchfile) and paste the 3 lines starting with '+' there. Remove the leading plus signs.
    2) Find the file wp-content/plugins/nivo-slider-for-wordpress/nivoslider4wp-show.php (defined by line 14 in patchfile) and go to line 29 (defined by patchfile line 15). There should be a script element.
    3) Remove the line and the following line (they are marked with "-" in the patch file), and paste the lines marked with "+" in the patch file (again, remove the leading plus signs)
    4) repeat steps 2 and 3 for the remaining -/+ lines

    Alternatively, you can download complete files here:
    http://dl.dropbox.com/u/328788/nivoSlider4wp.js, save to wp-content/plugins/nivo-slider-for-wordpress/js/
    http://dl.dropbox.com/u/328788/nivoslider4wp-show.php, save to wp-content/plugins/nivo-slider-for-wordpress/ (overwrites a previous file)

    Hope this helps.

    Pyry

  7. andycheeseman
    Member
    Posted 2 years ago #

    Cheers Pyry. A great explanation (and the ready coded fix to boot!)

    Thanks,
    Andy.

  8. olalindberg
    Member
    Posted 2 years ago #

    Pyryk,
    Thanks a lot for the help! Solved my issues as well. Great done!

    I sent marcelotorres (http://profiles.wordpress.org/users/marcelotorres/) an e-mail about this issue a month ago but I haven't heard anything from him. Hopefully it'll be fixed so we don't mess it up in the next update.

    Again. Thakns!

  9. daledude
    Member
    Posted 2 years ago #

    +1 also. I don't know why people bundle jQuery with their plugin when jQuery comes with WordPress. Makes no sense and causes too many headaches especially when I have to go in and delete the line every update.

  10. Heritz
    Member
    Posted 2 years ago #

    Pain in the nuts. To fix it, open the nivoslider4wp-show.php file on your favorite text editor and completely remove the jquery call line, which looks something like this:

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

    Save the file and reupload it via FTP. You can also edit this file from the plugin editor on WordPress. (Plugins -> Nivo -> edit).

  11. sanderbaks
    Member
    Posted 1 year ago #

    Hi Heritz,

    It worked, thanks !! Im happy again!

  12. mische7
    Member
    Posted 1 year ago #

    Hey everyone. I'm using Elegant Themes 'Boutique' as well as WP E-Commerce to set up a store. I'm frustrated with the slider that's part of the theme and was thinking of going with the Nivo Slider. Based on your experiences, would you still choose it if you had it to do again? I'm not sure when the latest update was or if they've fixed the jquery conflict but it looks like you've all figured out the work-around.

    I'd love to hear what you think. (the other slider I'm considering is the Wow Slider, though I haven't researched that one much yet.)

    Thanks!
    Mische

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic