Gallery + FancyBox not Working (Opening File Path Only)

I'm having issues sitewide with the Gallery FancyBox.

I imported a demo to go off of that had the pre-existing shortcode necessary to implement the gallery, however (even with all plugins disabled) the fancybox does not work in the gallery shortcode. I've searched this forum already for a previous discussion on the topic and haven't quite found this exact issue so I'm posting my problem.

An applicable url: [Links visible only for registered users] (About halfway down the page there is a 4 column gallery)

I've even tried adding the class to the shortcode itself, adding the class to the section, along with various other implementations. I've disabled & re-enabled the FancyBox option. There are not Javascript Errors in my console on page load.

However, when I log the console I receive this:

jquery.plugins.js?ver=6.1:48 Uncaught TypeError: Cannot read property 'indexOf' of undefinedjquery.plugins.js?ver=6.1:48 (anonymous function)jquery.js?ver=1.11.1:2 m.extend.mapjquery.plugins.js?ver=6.1:48 e.prettyPhoto.initializejquery.js?ver=1.11.1:3 m.event.dispatchjquery.js?ver=1.11.1:3 r.handle
Resource interpreted as Document but transferred with MIME type image/png: "[Links visible only for registered users]".

Is this maybe a .htdocs or server side configuration error? Please help.

Comments

  • Hi,

    you have this problem because you got class="prettyphoto" instead of rel="prettyphoto". Please replace it in your column item and all will be fine.
  • The problem existed BEFORE I added class... I tried to add class to fix it.
  • I just swapped out class for rel and it still exists.

    The problem existed even from the DIRECTLY imported demo that was provided from your importer. I used the same code, changed out the id's on the gallery images and later realized that the links went straight to the files.
  • Console Log:
    Uncaught TypeError: Cannot read property 'indexOf' of undefined    ->   jquery.plugins.js?ver=6.1:48
    (anonymous function)   ->   jquery.js?ver=1.11.1:2
    m.extend.map   ->   jquery.plugins.js?ver=6.1:48
    e.prettyPhoto.initialize    ->      jquery.js?ver=1.11.1:3 
    m.event.dispatch   ->      jquery.js?ver=1.11.1:3 
    r.handle -> Resource interpreted as Document but transferred with MIME type image/jpeg: "[Links visible only for registered users]".
  • Did you switched class="prettyphoto" to rel="prettyphoto" for the popup video which is above gallery? Because we are talking about this section, not gallery. As we see in the code, you did not switched and we are not able to have a look on it.
  • It works.... Videos work.

    The image gallery does not. File extensions .jpg are not being recognized. Please look at my console log above to see the error.

    It doesn't matter if I add the extra class on the video or not because it is working.

    I just installed an external plugin "Easy Fancybox" and disabled the built in plugin and everything is working now. If you would actually like to troubleshoot the problem I could switch it back. Please be aware that the class="prettyphoto" or rel="prettyphoto" regardless of which is used does NOT fix the problem.
  • I believe it is either a jQuery compatibility issue or a MIME type error...
  • edited January 2015
    To fix the problem I added the following to my .htaccess file:


    AddType application/x-javascript .js
  • If above trick in .htaccess file helped, then it means that settings on server side are not complete.

    Anyway thanks for explanation! We're glad to hear that you solved it.
  • Unfortunately, I was mistaken in thinking this fixed the problem...

    It re-appeared.

    Strangely, it is working on this page:

    But it is not working on this page:
  • Call to action item have 3 classes added as we see in the code. Please remove them and leave just prettyphoto class and everything will be fine.
  • Thank you!
  • Previously it was NOT centering, so I tried to add the class to fix it and must have forgotten about it.
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.