Problem/Motivation
Using...
- Media entity
- Media entity image
- CKEditor
- Embed button + view widget
- Entity Browser + view
- Custom theme based on Bootstrap
With a core theme enabled, the embed process works smoothly. With our custom Bootstrap-based theme enabled, selecting entities and clicking the submit button redirects to a dialog with a "Select entities" button. That button redirects back to a dialog with the entity browser (looping back to the beginning).
Proposed resolution
There are so many pieces involved here that I don't fully understand what's going on, but I do know the Bootstrap theme modifies the dialog itself. The Entity Embed JS should not rely on its own custom classes.
Comment | File | Size | Author |
---|---|---|---|
#2 | entity-embed-2854755-2-custom-theme-problem.patch | 507 bytes | milesw |
Comments
Comment #2
milesw CreditAttribution: milesw commentedThis patch simply changes the dialog selector from
.entity-select-dialog
to#drupal-modal
. I believe this is safe, since that selector is already being used inDrupal.behaviors.entityEmbedDialog
, but this should be tested.With this change, the embed process works smoothly with our Bootstrap-based theme.
Comment #4
AdamPS CreditAttribution: AdamPS at AlbanyWeb commentedThanks, for the patch. It has mostly solved the problem for me. However I have to turn off the theme setting "Enable Bootstrap Modals" otherwise the "back" and"embed" buttons get corrupted.
Comment #5
leisurman CreditAttribution: leisurman commentedThe patch works for me but I also had to disable "Enable Bootstrap Modals"
Comment #6
leisurman CreditAttribution: leisurman commentedUpdate, I didn't need the patch. Just disable "Enable Bootstrap Modals" and it fixes the problem
Comment #7
Dave ReidThis is an issue with the Bootstrap theme: #2838190: Fake modal buttons in footer aren't being replaced during AJAX update