- Merge request !1Issue #3306230: It is not possible to have the embedded content modal open another modal. β (Open) created by nuez
I am using https://www.drupal.org/project/uswds_ckeditor_integration β with the embed content. But when I click on the embed content icon, its showing the loading icon for a second but doesn't load the modal window with the dropdown. When I debugged I am seeing AJAX error as below,
nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /embedded-content/dialog\nStatusText: OK\nResponseText: Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /app/web/core/lib/Drupal/Component/Utility/Unicode.php on line 477\nDeprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /app/web/core/lib/Drupal/Component/Utility/Xss.php on line 69\n- π¨πΏCzech Republic milos.kroulik
It looks like the patch from #3 no longer applies:
$ patch -p1 < allow-stacked-modals.patch patching file src/Form/EmbeddedContentDialogForm.php Hunk #1 FAILED at 80. Hunk #2 succeeded at 189 (offset -4 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/Form/EmbeddedContentDialogForm.php.rej
It looks like there should be a note on the project page, that nested modals issue currently can't be solved.
- First commit to issue fork.
- last update
over 1 year ago 2 pass - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Reroll for those using patches, also pushed updated MR
With the latest version, we are not able to save the content after the merge. And when I checked the code, its missing this "$form['#modal_selector'] = '#embedded-content-dialog-form';" in the EmbeddedContentDialogForm. So I had to use this patch to get it working.
- Status changed to Needs review
over 1 year ago 6:35am 19 July 2023 - last update
over 1 year ago 2 pass - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The attached in conjunction with #2741877-109: Nested modals don't work: opening a modal from a modal closes the original β allows you to embed inside embeds. Tested 4 layers deep π€―
Interdiff against #9
- last update
over 1 year ago 2 pass - πͺπΈSpain nuez Madrid, Spain
Thank you for the reroll!
As you know the nested modals issue is a very old issue affecting a lot of use cases. I've proposed a solution in that issue , that might have an API change, non breaking though, ( https://www.drupal.org/project/drupal/issues/2741877#comment-13559133 π Nested modals don't work: opening a modal from a modal closes the original Needs work and later)
The issue is already 3 years old, but i think my suggestion is still the approach of the subsequent rerolls in that same issue.
@larowlan do you think we can move that issue forward and see if we can land it in core?
I'll have a chat with wim leers on slack see if he can help as well
Cheers,
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yep, keeping an eye on that one too.
I'm not sure stacked modals is a great idea but π€·ββοΈ
- Status changed to Postponed
over 1 year ago 9:16am 19 July 2023 - πͺπΈSpain nuez Madrid, Spain
I agree that stacked modals might be not be a great idea UI wise, but it is a reality that cannot be ignored imho, and for which there is no real alternative.
The offset canvas modal is a solution to one extra layer. Opening the ckeditor5_embedded_content in an offset canvas would solve some issues, but that means that you can't use it in a block body, since that one also opens in an offset canvas. Maybe we should make it configurable that it opens in either offset or modal. That could solve some use cases. I'll put it on the roadmap for 2.x.
- last update
over 1 year ago 2 pass - Status changed to Needs review
over 1 year ago 11:57pm 19 July 2023 - last update
over 1 year ago 2 pass - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Realised I left behind some cruft from an earlier attempt in the last patch, removed it
- First commit to issue fork.
- last update
7 months ago 2 pass - π³πΏNew Zealand danielveza Brisbane, AU
I've rerolled the patch and pushed that straight to the MR
- Status changed to Closed: won't fix
about 2 months ago 3:26pm 7 October 2024 - πͺπΈSpain nuez Madrid, Spain
This issue is addressed in the embedded_content module which replaces this one. https://www.drupal.org/project/embedded_content β