-
-
Notifications
You must be signed in to change notification settings - Fork 529
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 Browser doesn't display popup to select a media source for user profile photos in MODX 3.0 #16510
Comments
Ok, so after a little research on this I found that the behavior has always been this way dating back to the introduction of profile photos nearly 10 years ago. The source combo was purposely hidden and a system setting ( {
id: 'modx-user-photo'
,fieldLabel: _('user_photo')
,name: 'photo'
,xtype: 'modx-combo-browser'
,hideFiles: true
,source: MODx.config['photo_profile_source'] || MODx.config.default_media_source
,hideSourceCombo: true
,anchor: '100%'
} @rtripault was the author of the original code and may be able to shed some light on that decision (maybe ... it's been an awfully long time!). Before proceeding on any changes, the question arises: Is this a bug, a missing feature, or a move made (to limit the source to the two settings-defined options) for good reason that we should stick with? |
Ah, I was hoping there was a system setting but couldn't find it. That kind of makes sense, but I don't know why just using the normal media manager setup wouldn't work. I assume access to media sources would be limited by permissions set on each source, as it is in every other context of using the media manager. If anything is preventing that from being the case for profile photos, then I can see why a system setting would be needed. What would be nicest is to make the system setting optional: if something is entered there, then only show that media source; and if it's empty then show the full list in the browser. |
That's an old one indeed! Not sure what was the old me thinking back then... i guess ease of being able to render pictures in the frontend then... but having ability to pick the source definitely makes sense! With current implementation, you might end up having a media source configured which some user might not have access too. |
Alright, sounds like there's no reason not to add the sources dropdown. It'll involve a handful of adjustments and additions, which I could dig into in the next week or two... |
After thinking on this a little more and batting it around with @opengeek, I've concluded that the best course of action would be:
This should offer plenty of granularity via user group, context, and/or user settings. BTW, the reason to not enable the sources dropdown: If we did that, we'd need to persist that source via a new column in the user profile; not a big deal, but it's really not the type of data we want to be storing there. |
Well no wonder I coudn't find it! |
BTW, in the submitted PR I elected to not add a disabled source dropdown as, after another survey of how the Media Browser appears in other instances, it was more consistent to hide it than not. |
### What does it do? Adds a long-missing setting for specifying user's profile photo media source. Also, moves up (and tweaks) the associated Lexicon entries. ### Why is it needed? The logic has been present in the backend to specify a Media Source other that the default for user profile photos since they were introduced nearly 10 years ago. However, the system setting was never added to the build, making it virtually unknown that this functionality existed. ### How to test Run `_build/transport.core.php` to install the new setting. Then search for `photo_profile_source` in the system settings, change its value, and verify that the Media Source shown in the Media Browser (when editing/adding a user profile photo) matches that which you specified in the setting. ### Related issue(s)/PR(s) Resolves #16510
### What does it do? Adds a long-missing setting for specifying user's profile photo media source. Also, moves up (and tweaks) the associated Lexicon entries. ### Why is it needed? The logic has been present in the backend to specify a Media Source other that the default for user profile photos since they were introduced nearly 10 years ago. However, the system setting was never added to the build, making it virtually unknown that this functionality existed. ### How to test Run `_build/transport.core.php` to install the new setting. Then search for `photo_profile_source` in the system settings, change its value, and verify that the Media Source shown in the Media Browser (when editing/adding a user profile photo) matches that which you specified in the setting. ### Related issue(s)/PR(s) Resolves #16510
Bug report
Summary
Media browser that popups up when selecting a photo for a user profile only displays the default media source
Step to reproduce
In MODX 3 site, edit your profile, and click the icon to select a user photo.
Observed behavior
There is no popup to select a media source. Only the folder for the default media source is displayed.
Expected behavior
The Media Browser popup to select a media source should be displayed, just like it is everywhere else the media browser is used.
Environment
MODX 3.0.4-pl
The text was updated successfully, but these errors were encountered: