• Resolved jimojeda

    (@jimojeda)


    Hello,

    First of all, I’m a big fan of your awesome plugin!

    I love it and I truly appreciate the hard work you do to offer support to everyone here.

    Anyway, here’s what happened…

    I have this site that has images embedded and a couple of youtube videos.

    Just yesterday, it was working properly, when I click on the images, they open on the beautiful fancy box.

    When I clicked on the videos, which are images linking to the youtube videos, the video would open in a neat fancybox, same as the image.

    However, today I upgraded my wordpress installation to the latest version, which is 3.7.1 and the fancybox for youtube got ruined!

    Would you kindly look into it and let me know what can be done to fix it?

    The site is this one: https://www.AbbeysTexasBBQ.com

    Thanks for your help.

    Jaime

    https://www.ads-software.com/plugins/easy-fancybox/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter jimojeda

    (@jimojeda)

    Oh, and I even added the class=”fancybox-youtube” tag on one of the links and it still doesn’t work.

    Thanks,

    Jaime

    Hi Jim,

    Some plugin (or your theme?) is forcing WordPress to use an outdated version of jQuery. I see in your page source

    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=3.7.1'></script>

    and the location in respect to other scripts make me suspect it is a plugin called “vertical scroll recent posts” (or something). Could you disable that one for a sec and test your Youtube links again?

    Thread Starter jimojeda

    (@jimojeda)

    Thanks for your awesome willingness to help me out on this.

    I disabled that plugin and it still didn’t work. I then deleted it completely and still no go.

    I looked for a similar plugin from another author that looks more up-to-date and installed it, it’s called jQuery Vertical Scroller, I installed it and activated it. Since it’s compatible with the latest wordpress, I figured that might update the jQuery links, but still nothing.

    Could it be the theme itself?

    But if it is the theme… why was it working perfectly until I updated wordpress to the latest one?

    Wouldn’t WordPress itself be the culprit in this instance?

    So confused and frustrated… and I really appreciate your help.

    Thank you so much!

    Sincerely,

    Jaime Ojeda

    P.S. Is it advisable for me to simply modify the source code and update that link to point to the latest jQuery files? What do you recommend?

    Thread Starter jimojeda

    (@jimojeda)

    By the way, I found this in the “functions.php” file of the theme itself.

    //load frontend scripts
    function script_loader() {
    	if (!is_admin()) {
    		global $theme_options;
    		wp_register_style('font2', 'https://fonts.googleapis.com/css?family=OFL+Sorts+Mill+Goudy+TT:regular,italic');
    		wp_enqueue_style('font2');
    
    		wp_register_style('style', get_bloginfo('stylesheet_url'));
    		wp_enqueue_style('style');
    
    		wp_deregister_script('jquery');
    		wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
    		wp_enqueue_script('jquery');
    
    		if ($theme_options['cp_slider_show'] != 'disabled') {
    			wp_register_script('nivo', get_bloginfo('template_directory').'/js/jquery.nivo.slider.js', array("jquery"));
    			wp_enqueue_script('nivo');
    			wp_register_style('nivostyle', get_bloginfo('template_directory').'/nivo-slider.css');
    			wp_enqueue_style('nivostyle');
    		}
    
    		wp_register_script('cufon', get_bloginfo('template_directory').'/fonts/cufon-yui.js', array("jquery"));
    		wp_enqueue_script('cufon');
    		wp_register_script('font', get_bloginfo('template_directory').'/fonts/Junction_400.font.js', array("jquery"));
    		wp_enqueue_script('font');
    
    		wp_register_script('tweet', get_template_directory_uri().'/js/jquery.tweet.js', array("jquery"));
    		wp_enqueue_script('tweet');
    
    		wp_register_script('imgCenter', get_template_directory_uri().'/js/jquery.imgCenter.minified.js', array("jquery"));
    		wp_enqueue_script('imgCenter');
    
    		wp_register_script('fancybox', get_template_directory_uri().'/js/fancybox/jquery.fancybox-1.3.4.pack.js', array("jquery"));
    		wp_enqueue_script('fancybox');
    		wp_register_style('fancyboxstyle', get_template_directory_uri().'/js/fancybox/jquery.fancybox-1.3.4.css');
    		wp_enqueue_style('fancyboxstyle');
    
    		wp_register_style('cart66-css-custom', get_template_directory_uri().'/cart66.custom.css', array("cart66-css"));
    		wp_enqueue_style('cart66-css-custom');
    	}
    }
    add_action('wp_enqueue_scripts', 'script_loader');

    If this has anything I can update let me know.

    But again, I just wanted to repeat that the only change that really broke your awesome plugin was updating wordpress to 3.7.1 because the previous version made your script work well for images and youtube videos with no issues.

    However, if there’s anything I can do to fix this, please let me know.

    Sincerely,

    Jaime

    At quick glance it seems to be the line

    wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');

    there in functions.php.

    Change 1.4.2 to 1.10.2 and you should be fine…

    Thread Starter jimojeda

    (@jimojeda)

    You’re right, that’s what it seems like “at quick glance”… but after I tried that, it totally broke the script.

    Not even images would open up in jquery!

    So I played with all the different version I know were available and every time I went to 1.5.0 and above, Easy Fancybox would not work at all. So I put it back to 1.4.2.

    I just can’t figure out what else could be wrong.

    Any other ideas?

    Sincerely,

    Jaime

    I think it is because of the code used in Nivo Slider (uses “live()”), you cannot go past 1.8

    Try that and make sure you clear your browser cache before you test it in your browser!

    Thread Starter jimojeda

    (@jimojeda)

    Trying it now and I’ll let you know.

    Jaime

    Thread Starter jimojeda

    (@jimojeda)

    RavanH!!!!!

    You’re an amazing GENIUS AND A HALF!!!!!!

    Changing it to 1.8.0 fixed the issue!!!

    You’re too awesome man!!!!!!

    Please try it on your end and let me know if it works like it does for me.

    https://www.AbbeysTexasBBQ.com

    Sincerely,

    Jaime

    All workin fine. By the way, you can go up to 1.8.3 ??

    Hi,

    I have the same problem with Easy Fancybox, it just wont load images. I’m also using wp 3.7.1

    My site is: https://www.beautylounge.ee/galerii/

    Can anyone please take a look and tell me if I too can fix it by changing the jQuery ??

    Thanks,
    Jim

    Thread Starter jimojeda

    (@jimojeda)

    Hi Jim!

    I think it could definitely help to try that.

    I notice that your theme is loading version 1.4

    Why not try the latest? That would be 1.10.2

    If that doesn’t work, then wait for the awesome RavanH to help you.

    Sincerely,

    Jaime Ojeda

    I tried to change it in the themes header.php by changing 1.4 into 1.10.2, but no luck ??

    Jim

    Hi Jim, your theme is missing an essential part: open the footer.php template and place just above the closing </body> tag the line

    <?php wp_footer(); ?>

    then save and check your site ??

    Oh.. thank you so very much.. this fixed everything !!! =)

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Upgraded wordpress and youtube stopped working with easy fancybox… help’ is closed to new replies.