RTC NPM Resource Changed bug Pending

User tests: Successful: Unsuccessful:

avatar krishnagandhicode
krishnagandhicode
19 Mar 2026

Pull Request resolves #25843

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

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.

Testing Instructions

In administrator -> system -> manage -> plugins - disable all media-action plugins (in filter options go to select style and choose media-action - disable all 3.
image

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).

Actual result BEFORE applying this Pull Request

The edit(pencil) icon appears :
image

On clicking on the icon you get this empty page

Screenshot 2026-03-19 190240

Expected result AFTER applying this Pull Request

Now you don't see that icon if no media action pluginn is enabled.
image

also if you enable only crop plugin
image

then yes the edit(pencil) icon will be visible and on clicking only crop functionality is there.
Screenshot 2026-03-19 200148

similalry for other (crop , resize ,rotate) or if you select any 2 or all 3.

Link to documentations

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

avatar krishnagandhicode krishnagandhicode - open - 19 Mar 2026
avatar krishnagandhicode krishnagandhicode - change - 19 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Mar 2026
Category JavaScript Administration com_media NPM Change
avatar laoneo
laoneo - comment - 19 Mar 2026

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

avatar exlemor exlemor - test_item - 19 Mar 2026 - Tested successfully
avatar exlemor
exlemor - comment - 19 Mar 2026

I have tested this item ✅ successfully on 221f308

I have tested this successfully! Thanks @krishnagandhicode! woohoo!


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

avatar krishnagandhicode
krishnagandhicode - comment - 19 Mar 2026

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 ; )

avatar brianteeman brianteeman - test_item - 19 Mar 2026 - Tested successfully
avatar brianteeman
brianteeman - comment - 19 Mar 2026

I have tested this item ✅ successfully on 221f308

Thank you - this one has bugged me for so long


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

avatar laoneo laoneo - change - 20 Mar 2026
Status Pending Ready to Commit
avatar laoneo
laoneo - comment - 20 Mar 2026

rtc


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

avatar muhme
muhme - comment - 20 Mar 2026

✅ Final test before merge with JBT

  • Seen the empty media edit page and no more working Close button before PR
  • Applied PR with Patch Tester and npm run build:js && npm run build:com_media:dev
    • (Only) Edit button is no more shown if all three Media Action plugins are disabled
    • If only one of the three Media Action plugins is enabled, edit button is shown and the action is available and working
    • If all three Media Actions plugins are enabled all three actions are present
    • Working on JPG, JPEG and PNG
    • Still no edit button on GIF
    • No unusual JS console errors and Joomla log messages
avatar muhme muhme - change - 20 Mar 2026
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
avatar muhme muhme - close - 20 Mar 2026
avatar muhme muhme - merge - 20 Mar 2026
avatar muhme
muhme - comment - 20 Mar 2026

Thank you @krishnagandhicode for your contribution. Thank you @laoneo for your support. Thank you @exlemor and @brianteeman for testing.

Add a Comment

Login with GitHub to post a comment