• Resolved AntiDayton

    (@antidayton)


    Hello,

    Previously the plugin worked flawlessly for me. Now, I am also having a hard time, namely after last two updates. My Flickr mosaic galleries are not showing, and one gallery with “load more” button does not show images and clicking button does nothing. Could you please help.

    Mosaic gallery example: https://antidayton.com/oktobar-2013/

    Mosaic gallery example (with load more button): https://antidayton.com/galerija-ljiljani/

    Many thanks and kind regards,
    A.

    The page I need help with: [log in to see the link]

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

    (@sayontan)

    The only difference between the previous versions and the last two updates is that now Photonic’s JS files are included in the footer, and they are only included if your page is using Photonic.

    It would appear as though in your case the some other plugin is interfering with the JavaScript when Photonic’s scripts go to the footer.

    You can set it back to the way it was previously by selecting the option Photonic → Settings → Generic Options → Generic Settings &ararr; Include Photonic JS for non-Photonic Images / Videos. This will put Photonic’s scripts back in the header and is likely to resolve the issues.

    Thread Starter AntiDayton

    (@antidayton)

    Thanks for your kind reply.

    I am not sure why it isn’t working.

    I have tried disabling all plugins and enabling them one by one – it doesn’t work. Tried enabling development mode in Cloudflare account – also nothing. After I selected the option you mentioned with fingers crossed (Photonic → Settings → Generic Options → Generic Settings &; Include Photonic JS for non-Photonic Images / Videos), it also doesn’t work.

    When i look at the console, I see several errors: Uncaught ReferenceError …

    I’m clueless.

    Plugin Author Sayontan Sinha

    (@sayontan)

    OK – I investigated and it looks like the culprit here is your theme. The closest thread I found looking at your errors is this one, which references a retina.min.js file defining a global exports variable that causes the clash.

    Your theme incidentally has this file, and it does seem to be lifted from some place, and has the exact same problem – it redefines the exports variable (for reference, here is the original issue on the RetinaJS script: https://github.com/strues/retinajs/issues/260). The link on GitHub does say that the unminified version should be fine, but I doubt if your theme has the option.

    What is happening is that the Photonic script is getting loaded after this script, and the exports variable has been corrupted by this file. Any JavaScript file after the retina script will have the same problem if it uses modules.

    I am about to leave on a week-long vacation, so I cannot do a patch release at this point, but this is what you can try:

    1. Go to the file wp-content/plugins/photonic/photonic.php, line 326. You will see this:
      wp_enqueue_script('photonic-lightbox', plugins_url('include/scripts/third-party/'.$photonic_slideshow_library.'/'.$photonic_slideshow_library.PHOTONIC_DEV_MODE.'.js', __FILE__), $lb_deps, $this->get_version(plugin_dir_path(__FILE__).'include/scripts/third-party/'.$photonic_slideshow_library.'/'.$photonic_slideshow_library.PHOTONIC_DEV_MODE.'.js'), true);
    2. Change it to this:
      `wp_enqueue_script(‘photonic-lightbox’, plugins_url(‘include/scripts/third-party/’.$photonic_slideshow_library.’/’.$photonic_slideshow_library.PHOTONIC_DEV_MODE.’.js’, __FILE__), $lb_deps, $this->get_version(plugin_dir_path(__FILE__).’include/scripts/third-party/’.$photonic_slideshow_library.’/’.$photonic_slideshow_library.PHOTONIC_DEV_MODE.’.js’));
      </li>
      <li>Then go down to <a href=”https://plugins.trac.www.ads-software.com/browser/photonic/trunk/photonic.php#L348″>line 348</a> in the same file. You will see this:
      wp_enqueue_script('photonic', plugins_url('include/scripts/front-end/build/photonic-'.$slideshow_library.PHOTONIC_DEV_MODE.'.js', __FILE__), $photonic_dependencies, $this->get_version(plugin_dir_path(__FILE__).'include/scripts/front-end/build/photonic-'.$slideshow_library.PHOTONIC_DEV_MODE.'.js'), true);
      </li>
      <li>Chage it to this:
      wp_enqueue_script('photonic', plugins_url('include/scripts/front-end/build/photonic-'.$slideshow_library.PHOTONIC_DEV_MODE.'.js', __FILE__), $photonic_dependencies, $this->get_version(plugin_dir_path(__FILE__).'include/scripts/front-end/build/photonic-'.$slideshow_library.PHOTONIC_DEV_MODE.'.js'));</li>
      <li>Save the file.</li>
      </ol>

      I understand that both the above might be technically challenging, so as another option, you can try replacing the contents of the photonic.php file from https://pastebin.com/raw/xNUpUFE2.

      If you think the above is risky, you might want to consider downloading version 2.20 of Photonic <a href=”https://www.ads-software.com/plugins/photonic/advanced/”>from the bottom of the page here</a>. Note that the zip file will have a folder called photonic. Don’t copy the folder itself, but take all the contents of the folder and replace the contents of the existing wp-content/plugins/photonic folder on your website with it.

      Of course, the best option is if your theme fixes its code, but I understand there can be challenges with that.

    Plugin Author Sayontan Sinha

    (@sayontan)

    I have an update – I will release a patch this evening that will let you use Photonic without changing any code, but I would strongly encourage following up with your theme developer for this.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Version 2.23 of Photonic includes a new option, Photonic → Settings → Generic Options → Generic Settings → Force JS in header when possible. Select this option, along with Photonic → Settings → Generic Options → Generic Settings → nclude Photonic JS for non-Photonic Images / Videos, and you should be fine with your galleries.

    My recommendation to follow up with the theme developer still holds, though, as the RetinaJS script is firstly adding bloat to your theme, and secondly it is preventing optimization of other plugins.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Photonic Flickr mosaic gallery not showing’ is closed to new replies.