- ๐บ๐ธUnited States alphex Atlanta, GA USA
I can confirm patch 91 doesn't work.
This is on Drupal 9.5.5, but... hoping the patch carries backwards.
I have a media entity which takes vimeo URLs.
But the project needs to upload their own custom placeholder image, but we want to use media for that.
So media library opens a modal for the VIDEO entity type, then clicking the add media button for the place holder image, opens the 2nd modal.
Selecting the image sends you back to the node edit screen ... and, you lose the other work you did to build the video entity.
- ๐ซ๐ทFrance Fabsgugu
Hello,
I noticed a bug like this, so I don't know if it's related to this issue or not, but when I have a field media in a Node that has a media field itself, when I try to add a media in the modale I have a 500 error in the logs.To reproduce:
- Have activated the modules: Node, Media and Media Library (No Contrib module is involved, I reproduced this Bug on an instance without, I even deactivated CKeditor.)
- Create Media with a media field (and put media library in the formatter form)
- Create a Node which is linked to the media field created (and put media library in the formatter form and also put the field in the formatter of media library)
- Add a content of this Node then add a media on the media field, which allows to open the modal
- Once the modal is open, add media via the upload form, which then allows you to arrive on the modification page
- Click on add media
- Nothing is happeningI have warnings in logs :
Warning: count(): Parameter must be an array or an object that implements Countable in Drupal\media_library\Form\FileUploadForm->validateUploadElement() (line 211 of /var/lib/tugboat/stm/web/core/modules/media_library/src/Form/FileUploadForm.php)
Notice: Undefined index: fids in Drupal\media_library\Form\FileUploadForm->validateUploadElement() (line 211 of /var/lib/tugboat/stm/web/core/modules/media_library/src/Form/FileUploadForm.php)
And i have an error in the console (which I also have in the logs) :
- ๐บ๐ธUnited States bkosborne New Jersey, USA
Ran into this today and tested the workaround patch in #91. My test case is a media library widget, where the user uploads a new image media entity. The image entity bundle has a CKEditor-enabled text field. Before the patch, clicking the Link button in the CKE dialog closes the Media Library widget prematurely. After the patch, the link dialog opens on top of it as it should. However, it seems to cause other issues. After closing the link dialog and saving the entity, the "Save and Select" button doesn't close the Media Library dialog anymore.
- ๐บ๐ธUnited States R_H-L
With the widespread adoption of the HTML
dialog
element, this should become more a matter of modernizing modals. This element supports chaining dialogs, styling, form awareness, good accessibility, and a host of other benefits.Simple example:
<dialog id="first-dialog"> <p>Greetings, one and all!</p> <button data-role="open-dialog" data-target="#second-dialog" onclick="document.querySelector(this.getAttribute('data-target')).showModal()">Show second dialog</button> <button data-role="close-dialog" onclick="this.closest('dialog').close()">Close</button> </dialog> <dialog id="second-dialog"> <p>Surprise!</p> <button data-role="close-dialog" onclick="closest('dialog').close()">Close</button> </dialog> <button data-role="open-dialog" data-target="#first-dialog" onclick="document.querySelector(this.getAttribute('data-target')).showModal()">Show dialog</button>
- ๐ซ๐ทFrance arnaud-brugnon
#91 can't be apply on 10.1.
Here's the new version
- Status changed to Needs review
over 1 year ago 6:07am 17 July 2023 - last update
over 1 year ago Patch Failed to Apply - ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
- ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
D10.0 version for those who need it
- last update
over 1 year ago Custom Commands Failed - ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
More work here to support multiple editor dialogs, the saveCallback was previously only a single function but needs to be a Map keyed by the dialog selector
- Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org โEnvironment: PHP 8.2 & MySQL 8last update
over 1 year ago Waiting for branch to pass - ๐ฆ๐บAustralia larowlan ๐ฆ๐บ๐.au GMT+10
Fixed linting issues and regression with the 'Save and insert' button in media library (argument order mismatch)
- last update
over 1 year ago Custom Commands Failed - Status changed to Needs work
over 1 year ago 5:59pm 22 July 2023 - ๐บ๐ธUnited States smustgrave
CC Failure.
Also can the proposed solution be updated to include what path was taken.
- last update
over 1 year ago Patch Failed to Apply - ๐ฎ๐ณIndia _utsavsharma
Rerolled the patch for 11.x as the patch was not getting applied.
Please review. - last update
over 1 year ago 29,872 pass, 3 fail - ๐ฉ๐ชGermany a.dmitriiev
Uploading patch for 10.1.2 in case someone needs to use the fix for stable version. The change from 11.x patch for this file
core/misc/dialog/dialog.js
didn't work, because it has already more changes. - ๐ฉ๐ชGermany a.dmitriiev
The previous patch had a typo
core/modules/media_library/src/MediaLibraryEditorOpener.php
:--- a/core/modules/media_library/src/MediaLibraryEditorOpener.php +++ b/core/modules/media_library/src/MediaLibraryEditorOpener.php @@ -70,7 +70,7 @@ public function getSelectionResponse(MediaLibraryState $state, array $selected_i 'data-entity-uuid' => $selected_media->uuid(), ], ]; - $response->addCommand(new EditorDialogSave($values)); + $$response->addCommand(new EditorDialogSave($values, '#modal-media-library')); return $response; }
double
$$
. This is fixed in the new one. This patch is only to use in the project, there is no need to review it or test it. - last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - ๐ฉ๐ชGermany Rar9
2741877-10.1.5-115.patch not working with D10.1.16
- last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago 30,483 pass, 5 fail - ๐ช๐ธSpain pcambra Asturies
I think the re-rolls from #113 onward are not really working, here are a Drupal 10.1 patch and a Drupal 11 patch that are functional.
- Status changed to Needs review
about 1 year ago 12:19pm 22 November 2023 - last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago 30,600 pass, 3 fail - Status changed to Needs work
about 1 year ago 7:07pm 24 November 2023 - ๐บ๐ธUnited States smustgrave
Still needs an issue summary update before reviews.
- last update
12 months ago Custom Commands Failed - leymannx Berlin
Hiding patch, it's the same as in #2741877-121: Nested modals don't work: opening a modal from a modal closes the original โ .
I should have checked first. ๐ญ
- ๐บ๐ฆUkraine dinazaur
Fixed a bug that was caused by
dialogSettings.options
property. It led to unexpected behavior on modals. Sometimes they missed actions, not opened at all. - last update
11 months ago Patch Failed to Apply - ๐ช๐ธSpain nuez Madrid, Spain
The reroll from #123 seems to be missing a few things. Embedding media doesn't seem to work with this reroll.
I've literally rerolled the d10 patch from #119 and there are a few differences.
- last update
11 months ago Composer error. Unable to continue. - last update
11 months ago Custom Commands Failed - ๐บ๐ธUnited States darren oh Lakeland, Florida
Darren Oh โ made their first commit to this issueโs fork.
- Merge request !8105Issue #2741877 by nuez, larowlan, jastraat, mikhailkrainiuk, vakulrai,... โ (Open) created by darren oh
- ๐ฎ๐ณIndia mithun s Bangalore
Mithun S โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia mithun s Bangalore
Resolved the Linting issue appearing on MR.
- ๐ฎ๐ณIndia deepaksingh05
I'm facing the issue only when trying to update the content that has two nested modals to work.
Facing this error after applying the patch at #126 ๐ Nested modals don't work: opening a modal from a modal closes the original Needs work , I have tried almost every patch mentioned here.
I tried on ckeditor4 and as well as on ckeditor5. I'm using Drupal 10.2.6, I'm using entity_embed to upload the media. - ๐บ๐ธUnited States daniel korte Brooklyn, NY
Noting here that Iโm seeing a JS console error in D10.2.6 (with either patch #126 or the merge request since they are virtually the same) when attempting to embed media in ckeditor5 using a newly uploaded image and clicking the "Save and insert" button with the Media Library advanced UI enabled:
ajax.js?v=10.2.6:1143 An error occurred during the execution of the Ajax response: TypeError: Cannot read properties of undefined (reading 'options')
- ๐ฏ๐ดJordan Rajab Natshah Jordan
Attached a static patch file from the Drupal Core 2024-06-20 MR 8105
witch applies to both Drupal 10.3.x and 11.0.x branches
To be used with composer patches - ๐ง๐ทBrazil carolpettirossi Campinas - SP
Patch #134 worked perfectly on Drupal 10.3.0. Thanks for the re-roll Rajab.
- Merge request !8779Issue #2741877 by nuez, larowlan, jastraat, mikhailkrainiuk, vakulrai,... โ (Open) created by andre.bonon
- ๐ง๐ทBrazil andre.bonon
Attaching a patch file from the MR 8779 which applies to Drupal 10.2.x. (tested on 10.2.7) , to be used with composer patches.
It fixes an Ajax error from happening with the Layout builder modal and Drupal-off-canvas that wasn't fixed by the #126.
The Ajax error was preventing the LB modal from closing. - ๐ซ๐ทFrance xavier.masson Haute-Normandie
xavier.masson โ made their first commit to this issueโs fork.
- ๐ง๐ทBrazil renanmfd
Patch #137 for Drupal 10.3.x with:
- 025fb5d2 - Ensure dialogSettings variable is a object for dialog:afterclose event listener
- ๐ง๐ทBrazil renanmfd
Sorry, #140 patch was bad.
Patch #137 for Drupal 10.3.x with:
025fb5d2 - Ensure dialogSettings variable is a object for dialog:afterclose event listener
- ๐จ๐ญSwitzerland Lukas von Blarer
The patch works in some cases, but I have the same issues as described in #132
- ๐ซ๐ฎFinland anaconda777
None of the patches works for me:
What works:
Without this or any patch, When editing a node which is in modal and then opening a nother modal over it ( media entity browser for uploading media) works so that a modal opens over another modal and it can be closed without closing the parent.So nested modals are working with media entity browser and node.
What does not work:
When editing a node which is in modal, then another modal opened from ckeditor5 (AI ckeditor5 integration) causes a problem = closing that modal will close all modals. (Uncaught TypeError: dialogSettings is undefined)
Also tried with patch #142 and #134 and they do not fix this issue