Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    You have a conflicting lightbox script that is interfering with Photonic. You will need to disable it, because it is hijacking the clicks for your albums. Basically, when you click on a Photonic album thumbnail, it fetches all photos for that album. But due to this extra script (basically, Fancybos that comes from something called “EF” – not sure what that is on your site), it is treating the album as a single image causing an issue.

    Thread Starter janzeman

    (@janzeman)

    Hello Sayontan,

    Thanks for your reply. Not sure I would be able to fix this. I searched the source code and it seems that ‘fancybox’ is being used only by your plugin. Where did you see the ‘EF’? Maybe that could be a hint for me. I do not know how to disable the individual script I am afraid. Are you sure this is not a problem with the auth?

    For now I tested another plugin, it is not as nice as yours but it displays also the photos: https://www.vkodani.cz/sandbox/

    I noticed that FancyBox is one of the options of your plugin called Inbuilt Lightbox libraries. I tried to select another ones but this does not seem to have any effect.

    Plugin Author Sayontan Sinha

    (@sayontan)

    If you do a “View Source” on your page you see this:

    <script type="text/javascript">
    /* <![CDATA[ */
    var ef_string = {"ajax_url":"https:\/\/www.vkodani.cz\/wp-admin\/admin-ajax.php","ef_nonce":"7b5b55c474","template_directory":"https:\/\/www.vkodani.cz\/wp-content\/themes\/vkodani","fancybox_prev":"P\u0159edchoz\u00ed","fancybox_next":"Dal\u0161\u00ed","fancybox_close":"Zav\u0159\u00edt","fancybox_error":"Po\u017eadovan\u00fd obsah se nepoda\u0159ilo na\u010d\u00edst.<br>Zkuste to pros\u00edm pozd\u011bji."}
    /* ]]> */
    </script>

    This is not from Photonic. Upon further investigation, it looks like your theme is doing this. Take a look at the file https://www.vkodani.cz/wp-content/themes/vkodani/assets/js/script.104.min.js. That is including Fancybox.

    Thread Starter janzeman

    (@janzeman)

    Yes, I looked at source and “inspect” but overlooked this. So yes, it probably will be the theme itself. Tried to disable ALL the plugins – no change – another confirmation of your finding. Strange is that all worked perfectly some time ago – on the same theme. Will try to follow up on this js script. Thank you.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Since the theme file is minified, this is considerably harder to troubleshoot, but I see this in the file:

    jQuery(document).ready(function(e){
    	var t= {
    		helpers:{overlay:{locked:!1}},
    		tpl:{
    			prev:'<a title="'+ef_string.fancybox_prev+'" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
    			next:'<a title="'+ef_string.fancybox_next+'" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
    			closeBtn:'<a title="'+ef_string.fancybox_close+'" class="fancybox-item fancybox-close" href="javascript:;"></a>',
    			error:'<p class="fancybox-error">'+ef_string.fancybox_error+"</p>"
    		}
    	};
    	e("img").parent("a").fancybox(t),
    	e("picture").parent("a").fancybox(t),
    	e(".fancybox").fancybox(t)
    })

    I “pretty-printed” the above – it is very hard to read this in the minified file. If you see the last lines, they are causing the problem. In particular, this script is targeting any img that has a parent a – Photonic uses this markup, but depending on what type of a element it is, Photonic either opens its own lightbox, or opens the album.

    Thread Starter janzeman

    (@janzeman)

    Hello Sayontan, your help very appreciated. I am not web developer but know F12, also found a way how to easily unminify. What I do not know however is how to (temporarily) change the server source to test the change you suggested. On server I can find only script.min.js, what gets delivered to web client is however the its copy under script.104.min.js. I tried to disable WP Rocket in hope this one does the minification and ‘renaming’ but not it does not.
    Your suggestion sounds very promising to lead to the final fix but I still did not find how to perform this attempt.

    Thread Starter janzeman

    (@janzeman)

    Hmm, now I got idea to simply temporarily to delete that file from my hosting and yes, now it works. Proves your point again. Question for me remaining what to do as the final fix as ‘just removing’ the whole file will surely have effect on the rest of the web functionality. Cheers, Jan

    Plugin Author Sayontan Sinha

    (@sayontan)

    Question for me remaining what to do as the final fix as ‘just removing’ the whole file will surely have effect on the rest of the web functionality.

    Yes, it is likely to.

    However, consider that the file is actually generated by your theme and then minified by WP Rocket. So, really, the fix should be within your theme. All that needs to happen is that either the lightbox functionality in your theme needs to be disabled, or, the code that is being used to target images for the lightbox needs to exclude a elements that have the photonic-level-2-thumb CSS class.

    Thread Starter janzeman

    (@janzeman)

    Hmm, I do not know how to do the exclude rule. I simply deleted the given lines, made a backup of the file and everything seems to work. The web is a pretty simple one, I tested the other pages and found not failure. On one of the browsers the photos operations took very long and got timeout. That is probably by disabled WP Rokcet but also I guess I will be able to set max number of albums shown by your plugin. If you do not mind, try to click around for some 30 seconds. I tend to say this was the fix.
    Thank you once again for your excellent support!!!

    Thread Starter janzeman

    (@janzeman)

    I forgot to mark as resolved. Thank you again @sayontan

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Only albums not their content’ is closed to new replies.