? NPM Resource Changed PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
16 Jan 2023

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

avatar joomla-cms-bot joomla-cms-bot - change - 16 Jan 2023
Category JavaScript Repository NPM Change Layout Front End Plugins
avatar laoneo laoneo - open - 16 Jan 2023
avatar laoneo laoneo - change - 16 Jan 2023
Status New Pending
avatar laoneo laoneo - change - 16 Jan 2023
Labels Added: NPM Resource Changed PR-4.3-dev
avatar dgrammatiko dgrammatiko - test_item - 16 Jan 2023 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 16 Jan 2023

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.

avatar dgrammatiko
dgrammatiko - comment - 16 Jan 2023

Out of curiosity, why did you went with a new entry in the storageOption instead of reusing the existing media-picker key?
Screenshot 2023-01-16 at 17 55 52

avatar richard67
richard67 - comment - 16 Jan 2023
c8dbafd 16 Jan 2023 avatar laoneo cs
avatar laoneo
laoneo - comment - 16 Jan 2023

Out of curiosity, why did you went with a new entry in the storageOption instead of reusing the existing media-picker key? Screenshot 2023-01-16 at 17 55 52

Because the old code which adds the entry makes a check if it doesn't exist and then it adds it otherwise not. Using that one makes it unnecessary complex.

avatar dgrammatiko
dgrammatiko - comment - 16 Jan 2023

Makes sense, thanks

avatar carlitorweb carlitorweb - test_item - 16 Jan 2023 - Tested successfully
avatar carlitorweb
carlitorweb - comment - 16 Jan 2023

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.

avatar Quy Quy - alter_testresult - 16 Jan 2023 - dgrammatiko: Tested successfully
avatar Quy Quy - change - 16 Jan 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 16 Jan 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39647.

avatar carlitorweb
carlitorweb - comment - 16 Jan 2023

@dgrammatiko I just see with this PR the TODO comment: // @TODO add this attribute to the field in order to use it for all media types in the layout file. Can be possible this be related with the solution of the issue #35088 ?

avatar dgrammatiko
dgrammatiko - comment - 16 Jan 2023

Yup, that's the missing part

avatar carlitorweb
carlitorweb - comment - 16 Jan 2023

I wonder if is better insert the types allowed from the options in com_media, instead of hardcode it like this.

avatar laoneo laoneo - change - 17 Jan 2023
Labels Added: ?
avatar dgrammatiko dgrammatiko - test_item - 17 Jan 2023 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 17 Jan 2023

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.

avatar viocassel viocassel - test_item - 18 Jan 2023 - Tested successfully
avatar viocassel
viocassel - comment - 18 Jan 2023

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.

avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2023

I wonder if is better insert the types allowed from the options in com_media, instead of hardcode it like this.

@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 types, add a subform field list for the types (default value to images for b/c). The only thing that might need some thinking is the layout (to keep it 100% b/c), my personal idea would be to keep the default layout for images and add another when there are more options selected (the list field should be multiple, meaning the value could be any combination between images, audios, videos, documents).

avatar carlitorweb
carlitorweb - comment - 18 Jan 2023

@dgrammatiko thank for the hints. I will work with that, and see if I get it done.

avatar dgrammatiko dgrammatiko - test_item - 19 Jan 2023 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 19 Jan 2023

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.

avatar obuisard obuisard - close - 20 Jan 2023
avatar obuisard obuisard - merge - 20 Jan 2023
avatar obuisard obuisard - change - 20 Jan 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-01-20 00:16:20
Closed_By obuisard
avatar obuisard
obuisard - comment - 20 Jan 2023

Thank you Allon @laoneo !

Add a Comment

Login with GitHub to post a comment