Gallery icon indicating copy to clipboard operation
Gallery copied to clipboard

2.0.4 Interface "modMediaSourceInterface" not found on MODX 3.1.2

Open charismeki opened this issue 4 months ago • 6 comments

Hi tthere,

when trying to update Gallery from 2.0.3 > 2.0.4 the package could not be installed on several of webpages we are taking care of. The error is

Installation not possible with Error in /core/components/gallery/model/gallery/galleryalbumsmediasource.class.php:5: Interface "modMediaSourceInterface" not found "gallery-2.0.4-pl" not possible to install.

How to troubleshoot this issue? Permissions and Ownership is ok. I have fully removed the Gallery Plugin files from the hosting but have left the database untouched. I found https://community.modx.com/t/upgrade-2-8-7-to-3-0-5-uncaught-error-interface-modmediasourceinterface-not-found/7827 but I do not have a Gallery Media Source at Media Sources.

The system is running on LAMP stack with PHP 8.3.

Any ideas on this?

Many thanks and kind regards

charismeki avatar Aug 27 '25 10:08 charismeki

Does an entry exist in the system setting extension_packages for "gallery"? If so, try to remove the "gallery" entry from this setting and check if that fixes the issue.

halftrainedharry avatar Aug 29 '25 08:08 halftrainedharry

no the only entry in table system_settings for extension_packages is "system"

charismeki avatar Aug 29 '25 09:08 charismeki

sry not correct taking a look via system settings over the backend the value is [] In systems where the update was possible I have the same entry like in the ones where it is not possible

charismeki avatar Aug 29 '25 10:08 charismeki

And you are sure that there exist no media sources of type "Gallery Albums"? Database table modx_media_sources -> column "class_key" = GalleryAlbumsMediaSource or Gallery\Model\GalleryAlbumsMediaSource?


when trying to update Gallery from 2.0.3 > 2.0.4

I wasn't able to reproduce any issues when testing this update myself. I also don't see why the file /core/components/gallery/model/gallery/galleryalbumsmediasource.class.php would even be used in MODX 3 (especially on upgrading the extra). This file is only for MODX 2 and was replaced with core/components/gallery/src/Model/GalleryAlbumsMediaSource.php for MODX 3.

  • Did Gallery version 2.0.3 work correctly on MODX 3 before the update?
  • Is this an older site that was upgraded from MODX 2 to 3?

halftrainedharry avatar Aug 29 '25 12:08 halftrainedharry

Indeed in modx_media_sources I found a GallerySource. I removed it and voila installed 2.0.4 on one of the sites. Many thanks for pointing me to this. In case I do not comment any further this will do the trick with all other sites. Have a nice weekend!

charismeki avatar Aug 29 '25 12:08 charismeki

PS: Yes 2.0.3 was working correctly and I was able to downgrade / to remove the not installed 2.0.4 Yes updated from MODX 2 > 3

charismeki avatar Aug 29 '25 13:08 charismeki