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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

milesw created an issue. See original summary.

milesw’s picture

Status: Active » Needs review
FileSize
507 bytes

This 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 in Drupal.behaviors.entityEmbedDialog, but this should be tested.

With this change, the embed process works smoothly with our Bootstrap-based theme.

Status: Needs review » Needs work

The last submitted patch, 2: entity-embed-2854755-2-custom-theme-problem.patch, failed testing.

AdamPS’s picture

Thanks, 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.

leisurman’s picture

The patch works for me but I also had to disable "Enable Bootstrap Modals"

leisurman’s picture

Update, I didn't need the patch. Just disable "Enable Bootstrap Modals" and it fixes the problem

Dave Reid’s picture