Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Manager error on loading main page from dashboard #37

Open
temporalFluid opened this issue Feb 25, 2022 · 3 comments
Open

Media Manager error on loading main page from dashboard #37

temporalFluid opened this issue Feb 25, 2022 · 3 comments

Comments

@temporalFluid
Copy link

After a fresh error-free install of modx3-rc2, I installed mediamanager [BETA], configured it [as written on their github](https://github.com/Sterc/mediamanager), and then am confronted with this error on the media > media manager page:

Your default mediasource (ID 1) is not configured to use with the Media Manager. Please add a property 'mediamanagerSource' with value '1' to this mediasource and all other mediasources you want to use with the Media Manager.
I then triple checked the mediamanagerSource was set to 1 and that I added the property to the admin user and pointed it to the media source I'm using.

Finally, checking the error manager I am seeing the following errors:
[2022-02-24 17:47:42] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 1340) Could not get table class for class: modMediaSource [2022-02-24 17:47:42] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 1309) Could not get table name for class: modMediaSource [2022-02-24 17:47:42] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::getSelectColumns() is not a valid static method. [2022-02-24 17:48:08] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::load() is not a valid static method. [2022-02-24 17:48:16] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::load() is not a valid static method. [2022-02-24 17:56:17] (ERROR @ /home/******/public_html/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modMediaSource::load() is not a valid static method.

So I went in phpMyAdmin and found the modx_media_sources to double check the new property was registered properly:
a:4:{s:8:"basePath";a:6:{s:4:"name";s:8:"basePath";s:4:"desc";s:23:"prop_file.basePath_desc";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:1:"/";s:7:"lexicon";s:11:"core:source";}s:7:"baseUrl";a:6:{s:4:"name";s:7:"baseUrl";s:4:"desc";s:22:"prop_file.baseUrl_desc";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:1:"/";s:7:"lexicon";s:11:"core:source";}s:15:"imageExtensions";a:6:{s:4:"name";s:15:"imageExtensions";s:4:"desc";s:30:"prop_file.imageExtensions_desc";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:25:"jpg,jpeg,png,gif,svg,webp";s:7:"lexicon";s:11:"core:source";}s:18:"mediamanagerSource";a:6:{s:4:"name";s:18:"mediamanagerSource";s:4:"desc";s:0:"";s:4:"type";s:9:"textfield";s:7:"options";a:0:{}s:5:"value";s:1:"1";s:7:"lexicon";N;}}
I'm stuck wondering how to address this error. how to move forward. I was very excited to try this addon, as the present mediabrowser does not jive with my clients needs.

Any feedback or request for more information truely appreciated!

Running
Modx3-RC2
PHP 8.1 (maybe the issue?)

@Falco-Boehnke
Copy link

I am also interested in a solution to this.

@Falco-Boehnke
Copy link

Modx3-RC2
PHP: 7.4

I reinstalled the MediaManager from scratch, that broke the error message. Instead of giving me an ID it now gives me "mediasource (ID [[+ mediasource_id]]"

During installation I got this error:

Could not load class: modTransportPackage from mysql.modtransportpackage Could not get table name for class: Error 42000 executing statement: Array ( [0] => 42000 [1] => 1064 [2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS latestPackageWHERE latestPackage.package_name = modTra...' at line 3 ) PHP warning: Undefined array key "topic"

@matdave
Copy link

matdave commented Mar 3, 2023

After digging around in this, it appears you HAVE to have the media source tied to an ACL. It doesn't work if you don't have a user group with media source ACLs because it is querying the database directly. Once I added my media source to a user group and assigned my user to that group, it started working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants