Media Source "Filesystem" displays unexpectedly

My editor users, which have limited backend access, have access to two different media sources. They do not have access to the media source “filesystem”.
The ACL settings work fine, however, whenever the editor-users access the media source page (/manager/?a=media/browser), the drop down menu for selecting media sources is populated by the id of the filesystem media source (id 1). In addition, an alert pops up, prompting “access denied”.
Nevertheless, the editor-users then are able to select a dedicated media resource and use it.

I expected not to see the id nor the alert as this confuses the editor users.
How to achieve this?

This post may be related to an older one:

MODX 3.0.3, upgraded from a 2.8.5 setup. LAMP-Stack with PHP 8.2.9.
Both the server-side as well as the client-side caches have been cleared.

I believe when you open the Media Browser, the code tries to display/load the default media source (system setting default_media_source) without fallback if the user has no permission to display it.

You could change the system setting default_media_source to a media source everybody has access to (if that is possible) or alternatively add the setting default_media_source to the user group (:gear: → Access Control Lists → Edit User Group → tab “Settings”) to change the value for the selected group only.

1 Like

Thanks a lot – setting the default for the user group solved the issue!

You can also enter a default_media_source setting for individual users by editing their user profile, clicking the Settings tab, and entering it there.

You can enter a default_media_source setting for individual user groups, but I’ve found that entering a system setting here gets recorded, but disappears from the ACL managment in the manager, so you can’t find it to delete or edit (at least in MODX 2.8.5)! I had to go into the database itself to do that after the fact. After entering your setting here, if you go back to the group settings, can you still see the custom setting?

I can’t reproduce this behaviour.
(Maybe it’s a permissions issue. Did you try to edit/delete the setting as the Administrator?)

Possibly you forgot to add yourself to the appropriate User Group. As the admin, you should add yourself to every group to avoid hiding things from yourself.

yes, I edited as an administrator. shouldn’t that allow me to see all ACL settings? Even with sudo turned on in my profile, I can’t see the saved setting.

just checked the error log, and I’m getting an “Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT)” error.

I updated all tables and columns to use the same collation (utf8_unicode_ci), and now I can see the ACL settings. I don’t know how the collations got out of sync.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.