- Issue created by @jonathan_hunt
- Assigned to ericgsmith
- Issue was unassigned.
- Status changed to Needs work
11 months ago 9:54pm 7 December 2023 - π³πΏNew Zealand ericgsmith
Have made a good start / proof of concept on the MR.
- Status changed to Needs review
11 months ago 1:52am 8 December 2023 - π³πΏNew Zealand ericgsmith
Ready for review - ran out of time for tests today - keen on initial feedback before pushing futher.
- π³πΏNew Zealand ericgsmith
Attached stable patch for use with composer.
- πΊπ¦Ukraine blade_ukraine
Thank you ericgsmith. I like the solution. I'll try to review it and merge asap.
- Status changed to RTBC
11 months ago 10:59am 18 December 2023 - πΊπΈUnited States DamienMcKenna NH, USA
This appears to work really will, thank you.
- πΊπΈUnited States DamienMcKenna NH, USA
I tidied up the README.md file a little.
- πΊπΈUnited States loze Los Angeles
Tested and it does seem to work nicely. Thanks!
One possible improvement could be the ability to specify a form display mode in the settings for editing the modal.
- πΊπΈUnited States DamienMcKenna NH, USA
@loze: That's a great idea, but I think it could be done in a separate issue.
- πΊπΈUnited States DamienMcKenna NH, USA
In testing we noticed that the edit icon shows for media items even if the user doesn't have access to edit the specific media item; this is a common problem when some roles have permission to edit media they personally upload but not all media. Right now if a user in this situation clicks the edit icon they don't see anything - there's a console message (403 error from the request) but they don't know what's going on.
- πΊπΈUnited States DamienMcKenna NH, USA
FYI when using this patch you might run into a core bug: π Why does Route access checking differ from Entity access checking? Needs work
- πΊπΈUnited States DamienMcKenna NH, USA
Is there any way to hide the icon if the person doesn't have access? From what I can see it always shows the icon and then core fails to handle the permissions properly on the AJAX callback.
- πΊπΈUnited States DamienMcKenna NH, USA
I think this could be committed as-is with a note about permissions, and then the icon permissions handled separately as I suspect most sites will be ok with it.
- Status changed to Needs review
10 months ago 4:37pm 19 January 2024 - πΊπΈUnited States DamienMcKenna NH, USA
This repalces the permission check so it checks "update" instead of "edit".
- π©πͺGermany 4kant
I can confirm that the patch from #12 works as expected.
Thanks! - Status changed to RTBC
9 months ago 3:33am 9 February 2024 - π³πΏNew Zealand dieuwe Auckland, NZ
Patch #19 with the access check change is working very well for us.
- π³πΏNew Zealand ericgsmith
Thanks @DamienMcKenna for the fix on the access!
Closing MR and hiding old patches so latest patch is clear.
- πΊπΈUnited States kevin w
Thanks for this great patch that helped us re-gain the capability to view/edit embedded media after upgrading to CKEditor5. I did run into an issue that when the editor does not have "update" permission on the media, clicking on the "Edit media" button would fail silently. The other issue down the road is that the CoreEditorMediaDialog class will also be removed in Drupal 11. In this new patch, the button will open the edit page in a new tab if the current user has the "update media" permission. Otherwise it opens the view page.
- Status changed to Fixed
5 months ago 3:00am 19 June 2024 - πΊπ¦Ukraine blade_ukraine
New release is here https://www.drupal.org/project/edit_media_modal/releases/2.0.0 β
- πΊπΈUnited States kevin w
Recreated the patch in #27 for v2.0.0 in case anyone else needs it.
Automatically closed - issue fixed for 2 weeks with no activity.