Skip to content

Fix: Edit button fails to open image editor for attachments not in visible page#5160

Open
rithigavijayendran wants to merge 1 commit intoapostrophecms:mainfrom
rithigavijayendran:main
Open

Fix: Edit button fails to open image editor for attachments not in visible page#5160
rithigavijayendran wants to merge 1 commit intoapostrophecms:mainfrom
rithigavijayendran:main

Conversation

@rithigavijayendran
Copy link

Summary

Fixes an issue where the “Edit” button in the media manager fails to open the
image editor if the selected image is not included in the currently loaded
page of results.

Root Cause

The openImageEditor method was only executed when the image existed in the
loadedImages array. When the selected image was on page 2+ of the media
manager, this condition failed, preventing the editor dialog from opening.

Fix

Override the module's UI component (ManagerModal.vue) and ensure that
openImageEditor always emits the open-editor event with the correct
attachment ID.

Files Added

@BoDonkey BoDonkey requested a review from boutell November 18, 2025 10:16
Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please clarify how this change works? My first impression is that nothing in ApostropheCMS would discover or use this component if installed, but perhaps I have missed something. I don't believe we have any such mechanism to automatically discover such a component or that would invoke such a method if it were found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants