Support » Plugin: Easy FancyBox » [Plugin: Easy FancyBox] JS error: Uncaught TypeError: Property 'undefined' of object # is

  • Hi,

    I am trying to use FancyBox with an iframe on my site, and I keep getting this error:
    Uncaught TypeError: Property 'undefined' of object #<Object> is not a function

    The page is:

    and it happens when you click on the New York thumbnail (goes to an iframe).

    I tried deactivating plugins, except there were a couple that I tried to deactivate but when I did, it showed the site as broken… those are “Dropdown Menu Widget” and “Advanced Custom Fields”. So because of this I can’t really tell if it’s a conflict with these plugins.

    What should I do?

    Thanks so much!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author RavanH


    Several conflicts going on there at once… More than one jQuery library included, more than one lightbox script. Possibly more.

    Hey, thanks for the reply! Well I did end up getting it to work – in the nggallery, I changed it to use thickbox, then I used the thickbox stuff to display my video.

    BUT, I have a question, well I’m pretty n00b to WP… So just in general, how do you avoid these types of conflicts? It always seems like the easiest way to implement special features is to install plugins… but then all the code ends up conflicting! So, how do you usually work around that? Do you just try to install less plugins? What is your strategy? πŸ™‚


    Hey, I know you guys hate this kind of thing (from looking at past posts) but I was wondering if you could delete the website link I posted? I figured I’d be able to just edit it out later but I didn’t realize that we can’t edit our forum posts after a set amount of time πŸ™ I just found out now from looking through the other forum posts πŸ™

    Next time I will create a url using a url shortener and then later I can change it to 404! Wish I had known about this and come up with the idea before. :-/

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    No, we won’t delete the website link you posted, and if you had used a URL shortener, we would de-shorten the link instead. The link provides valuable information showcasing the problem and the potential solution and it can be helpful for others later.

    If you’re here to get answers to your problems only, then you’re in the wrong place. This is a forum and a resource for people trying to both find and give help to others. Archives of problems and solutions are valuable for all people, and retroactively changing things doesn’t help anybody but yourself, and even then it rarely helps you to do so.

    Nobody really cares that you had an issue and got it solved. You’re overthinking it.

    Wow. Different than ya’lls replies to others in the past. FYI, I really don’t think the link would be helpful in the future since by that time I would have solved the problem anyways… In addition, I wrote what my solution was anyways. But whatever, you’re the boss.

    Plugin Author RavanH


    Hi Heather,

    Conflicts between plugins are up to individual developers to avoid. As much as possible, anyway. That’s a downside of a large open community like this, there is no guarantee that different plugins are compatible or even tested in combination.

    So yes, keeping the number of plugins limited will help πŸ™‚ … Of course, it will also keep site speed at a decent level as some plugins tend to eat a lot of resources. While others are designed to improve site performance.

    I can imagine it seems like a dense forest but since you are already quite active on these forums, you will probably have some clues about how to spot valuable and well kept plugins and how to avoid the lesser ones πŸ˜‰

    In any case, another important factor in reducing conflicts is the theme. Thanks to not deleting the link I could take another peek ( πŸ˜‰ ) and beside the fact that it looks fantastic, there are some improvements that can be made: there seem to be many script files (starting with jquery.min.js) included by ‘hard code’ in the footer.php template. This is asking for conflicts because this way, WordPress has no way of knowing what scripts have been loaded already and so no way to prevent doppelgΓ€ngers.

    Basically, what needs to be done is remove these hard-coded lines and move the inclusion of scripts to functions.php, using wp_enqueue_script. Start with reading (you can find some great tutorials in the Resources list at the bottom too)

    Note that it is the $handle that WordPress uses to detect double inclusions so be careful in choosing the correct handle name. There is a list on that same Codex page of scripts that come with WordPress with their correct handle name. Other scripts you’ll have to name yourself but here are some tips:
    jquery.mousewheel.js should use the handle ‘jquery-mousewheel’ (use hyphens)
    jquery.jscrollpane.min.js should use the handle ‘jquery-jscrollpane’ (ignore min)
    engine.js does not matter how it is called since it is theme specific javascript code and not a library… Still it might cause conflict, though!

    Good luck πŸ™‚


    Wow, thank you so much for the helpful response!! I will definitely check that out πŸ™‚ πŸ™‚ I inherited this site btw and am new to wordpress and had no idea about how to avoid the double-inclusions. Thanks again!!!


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Easy FancyBox] JS error: Uncaught TypeError: Property 'undefined' of object # is’ is closed to new replies.