User tests: Successful: Unsuccessful:
Pull Request resolves #25843
This Pr fixes the Media Manager action menu by adding a check for media Action plugins and using it to control the Edit button - It now pass a new hasMediaActionPlugin value from the media config to the frontend, store it in the media API options, and include it in the edit visibility condition together with the existing image Extension check, so when all media-action plugins are disabled the pencil action is no longer shown and users will not no longer be ending up on a an empty page.
In administrator -> system -> manage -> plugins - disable all media-action plugins (in filter options go to select style and choose media-action - disable all 3.

now content ->to Media.
Select an image file (for example jpg/png) - when you hover over an image you see 3 dots click on it and you will see that edit(pencil) (which ideally should be visivle because you disabled all the 3 media-action plugins and that is what this PR fixes).
The edit(pencil) icon appears :

On clicking on the icon you get this empty page
Now you don't see that icon if no media action pluginn is enabled.

also if you enable only crop plugin

then yes the edit(pencil) icon will be visible and on clicking only crop functionality is there.

similalry for other (crop , resize ,rotate) or if you select any 2 or all 3.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Administration com_media NPM Change |
I have tested this item ✅ successfully on 221f308
I have tested this successfully! Thanks @krishnagandhicode! woohoo!
Nice, but you can simplify it. Instead of adding a new action, you can just add the logic like: 'canEdit' => $user->authorise('core.edit', 'com_media') && $hasMediaActionPlugins
Thanks, I looked into it - canEdit is also used for Rename visibility and its execution not only for the pencil edit action.
If we change canEdit to include media-action plugin availability - rename gets disabled when all media-action plugins are off ; )
I have tested this item ✅ successfully on 221f308
Thank you - this one has bugged me for so long
| Status | Pending | ⇒ | Ready to Commit |
rtc
✅ Final test before merge with JBT
npm run build:js && npm run build:com_media:dev
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-03-20 11:16:16 |
| Closed_By | ⇒ | muhme | |
| Labels |
Added:
RTC
NPM Resource Changed
bug
|
||
Thank you @krishnagandhicode for your contribution. Thank you @laoneo for your support. Thank you @exlemor and @brianteeman for testing.
Nice, but you can simplify it. Instead of adding a new action, you can just add the logic like:
'canEdit' => $user->authorise('core.edit', 'com_media') && $hasMediaActionPlugins