No Code Attached Yet bug
avatar david19161
david19161
27 Aug 2022

File : media/system/js/fields/joomla-media-select.js

Line : 184
await getImageSize(Joomla.selectedMediaFile.url);

Line : 207
await getImageSize(Joomla.selectedMediaFile.url);

Wont work reliably. Joomla.selectedMediaFile.url is relative. On say a sub-category page - it wont work
needs to be Joomla.selectedMediaFile.thumb ??
or Joomla.getOptions('system.paths').rootFull+Joomla.selectedMediaFile.url

TEST

I think this may only be an error condition so Force it to happen.

File : media/system/js/fields/joomla-media-select.js
Line : 181
Add : Joomla.selectedMediaFile.width=0;
before the condition : if (Joomla.selectedMediaFile.width === 0 || Joomla.selectedMediaFile.height === 0) {

Edit an article in a sub-category
Use Media Manager to insert an image into the content
Use browser F12 development tools to watch the failure condition? fail

avatar david19161 david19161 - change - 27 Aug 2022
Labels Removed: ?
avatar david19161 david19161 - open - 27 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 27 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Aug 2022
avatar dgrammatiko
dgrammatiko - comment - 27 Aug 2022

Wont work reliably. Joomla.selectedMediaFile.url is relative. On say a sub-category page - it wont work
needs to be Joomla.selectedMediaFile.thumb ?? Joomla.getOptions('system.paths').rootFull+Joomla.selectedMediaFile.url

That's a bug but the proposed solution is wrong as it assumes that the images live in the same server (the media manager supports external adapters). @laoneo any interest to check this?

avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023

Add a Comment

Login with GitHub to post a comment