We’ve been experiencing an issue on our staging and production multisites where we are unable to add images to Maxgalleria galleries. The “add images” button is unresponsive and new galleries don’t show the option to choose between images or video.
One of our devs was able to fix it by editing a line in maxgalleria.php. She has to change this line whenever we update the Maxgalleria core, so I thought I’d pass it along for your consideration.
Below is her message:
The MaxGalleria problems appear to be caused by the fact they are loading http resources over https. Their references to scripts and css are not set to https, or even better, protocol agnostic.
If you’re using Chrome or Firefox, open the development tool window and check the console. Safari seems to be more forgiving because I was able to add an image in both galleries. Chrome will load images http images over https but put out a warning in the console.
I did a bit of digging, and it turns out MaxGalleria is using an outdated way to refer to the plugins directory:
What they do:
#define('MAXGALLERIA_PLUGIN_URL', WP_PLUGIN_URL . '/' . MAXGALLERIA_PLUGIN_NAME);
How it should be:
define('MAXGALLERIA_PLUGIN_URL', plugin_dir_url() . '/' . MAXGALLERIA_PLUGIN_NAME);
So I fixed it on staging and production, but every time the plugin is updated this will be rolled back. Best way would be to suggest this fix so it’s fixed upstream. Since I found it for you, I would appreciate it if you forward it onto the plugin maintainers 🙂
Please let me know if you have any questions.
- The topic ‘Unable to add images, possible code fix’ is closed to new replies.