Do not hardcode the media manager API url to select an image#39647
Do not hardcode the media manager API url to select an image#39647obuisard merged 11 commits intojoomla:4.3-devfrom
Conversation
build/media_source/system/js/fields/joomla-media-select.w-c.es6.js
Outdated
Show resolved
Hide resolved
|
I have tested this item ✅ successfully on 2fe8e36 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647. |
|
@laoneo The JavaScript linter complains: https://ci.joomla.org/joomla/joomla-cms/60937/1/29 |
|
Makes sense, thanks |
|
I have tested this item ✅ successfully on 7cdd1a5 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647. |
|
@dgrammatiko I just see with this PR the TODO comment: |
|
Yup, that's the missing part |
|
I wonder if is better insert the types allowed from the options in com_media, instead of hardcode it like this. |
build/media_source/system/js/fields/joomla-media-select.w-c.es6.js
Outdated
Show resolved
Hide resolved
…6.js Co-authored-by: Dimitris Grammatikogiannis <dg@dgrammatiko.dev>
…6.js Co-authored-by: Dimitris Grammatikogiannis <dg@dgrammatiko.dev>
|
I have tested this item ✅ successfully on aecc96f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647. |
1 similar comment
|
I have tested this item ✅ successfully on aecc96f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647. |
@carlitorweb I'm not sure if the MediaHelper returns the list needed here (probably it does because I think I used it in the core media field). Also the implementation should be fairly easy, remove the hardcoded |
|
@dgrammatiko thank for the hints. I will work with that, and see if I get it done. |
|
I have tested this item ✅ successfully on 656f9aa This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647. |
|
Thank you Allon @laoneo ! |

Summary of Changes
The media manager is loading their API urls from the JS config store, expect when selecting files in the media form field. This pr extends the media manager the way that the API url is passed to the media field. For backwards compatibility it does a fallback to the old url when it doesn't exist already. This situation can be for older overrides.
@dgrammatiko can you review?
Testing Instructions
Select an intro or full image in the images field.
Actual result BEFORE applying this Pull Request
All works.
Expected result AFTER applying this Pull Request
All works.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed