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:
- 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);
- 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.