-2

I`m incurring in a compatibility problem between fancybox and slider pro, the plug in I use to visualize videos on my website.

There is this error in teh java code from fancybox:

89 Uncaught TypeError: jQuery(...).fancyboxforwp is not a function
at HTMLDocument.<anonymous> ((index):89)
at i (jquery.js?ver=1.12.4:2)
at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
at Function.ready (jquery.js?ver=1.12.4:2)
at HTMLDocument.K (jquery.js?ver=1.12.4:2)

which occurs in several pages on my wordpress and when fancybox is on it prevents my slider pro plug in to display and work.

Is there a chance this error could be fixed in fancybox?

Best, angy

  • You have provided the errors but not the code. I might suspect that this has something to do with an incompatibility with your jQuery version, as v 1.2.4 is over 10 years old. Both FancyBox and Slider Pro probably use a more updated version of jQuery, but that is unclear from the information you provided. – tshimkus Feb 04 '19 at 19:14
  • hi, thanks for your answer. I have to confess I don`t understand much of coding... – angy pop Feb 05 '19 at 19:05
  • I have my fancyboxm plug in active on my website, for example on this page http://www.angypop.com/?portfolio=desplicable-me-2 – angy pop Feb 05 '19 at 19:05
  • I had to deativate it to have the slider pro plug in show up otherwise it doens t – angy pop Feb 05 '19 at 19:06
  • from where do I upgrade jQuery exactly? is it another plug in? – angy pop Feb 05 '19 at 19:08
  • That fancybox plugin version if for 2012 and it looks like it is part of your site's theme. The script is loaded from `/themes/clean/js/jquery.fancybox-1.3.4.pack.js?ver=2012-08-20`. Slider Pro includes 4 jquery extensions for version 3.1. You could try a plugin like https://wordpress.org/plugins/version-control-for-jquery/ to allow multiple versions of jquery to be used. – tshimkus Feb 06 '19 at 04:14
  • ok, thanks, I`ll give it a try – angy pop Feb 06 '19 at 14:54

2 Answers2

0

Look at the error message -

jQuery(...).fancyboxforwp is not a function

So, something is trying to do something like $('.some-selector').fancyboxforwp(), but $.fn.fancyboxforwp method does not exist and the result is this error message.

Basically, your issue IS NOT related to fancybox at all. I do not know what fancyboxforwp is, maybe it is created by the authors of your current theme or some plugin, you should check it out by yourself.

Janis
  • 8,593
  • 1
  • 21
  • 27
0

In /wp-content/plugins/fancybox-for-wordpress/fancybox.php

Look for:

wp_register_script( 'fancybox', FBFW_URL . 'assets/js/jquery.fancybox.js', $jquery, '1.3.4', $footer ); 

Replace 1.3.4 with the right version where 'assets/js/jquery.fancybox.js' is defined

Fábio Antunes
  • 16,984
  • 18
  • 75
  • 96
Markbuild
  • 1
  • 1