Using entity_embed with a Bootstrapped derived theme breaks the AJAX handling. Switching back to Seven, it works again. No errors are generated, so I'm not able to figure out what's going on.

Comments

seanr created an issue. See original summary.

seanr’s picture

Issue summary: View changes
StevenWill’s picture

Not sure if this is the same issue, but when I try to add a image to a image field using the entity Image browser I get a cache error. If I change the admin theme to use seven to error goes away and the image is added to the field.

markhalliwell’s picture

Project: Bootstrap » Entity Embed
Version: 8.x-3.x-dev » 8.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

I'm tempted to say this is a bug with entity_embed since its likely not using theme independent selectors in its JS. A module should be able to work in any theme.

markhalliwell’s picture

P.S. using a core theme isn't a very good basis to test whether or not it's another theme's "fault". If anything, it just means that the module in question likely based it off markup that was present in those themes, which is very bad practice. A module should implement it's own selectors/data attributes that it knows will be there regardless if other classes or markup changes.

slashrsm’s picture

Issue tags: +D8Media

Would be great to have more info for reproduction (theme that is used, steps to get to the AJAX error, ...).

dave reid’s picture

seanr’s picture

@Dave Reid, no, I don't get that error. However, I do note that if I disable the Bootstrap modal stuff, it starts working again.

rachel_norfolk’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs work
StatusFileSize
new94.37 KB
new200.54 KB

I think I am seeing behaviour that sounds related.

So, I have an entity_embed button and, on the second stage of the embedding form, I couldn't understand why I was only seeing a "Next" button but not the "Back" and "Embed" buttons that are created by the entity_embed module.

Seems, when I use the admin account AND the bootstrap subtheme, I CAN see the buttons and they work correctly but the are in the main content of the form not the footer of the modal. See images

entity_embed:
as an admin

entity_embed with an admin account:
entity_embed example

Now - we can see that the buttons are not being moved into the footer. Not even sure where the extra "next" button is coming from at all yet...

rachel_norfolk’s picture

StatusFileSize
new1003.3 KB

A little more digging shows that the buttons ARE on the form but set, via css, to zero size.

buttons have zero size

Interestingly, this time I opened an embedded entity that I had already put onto the page and the footer did contain the buttons. It's as though they cannot be determined when the modal is made during creation but are there on reopening. So, once I remove the css zero-ing the buttons, I have two sets!

Erm - just making buttons zero size has to be a TERRIBLE accessibility solution, doesn't it????

rachel_norfolk’s picture

Project: Entity Embed » Bootstrap
Version: 8.x-1.x-dev » 8.x-3.x-dev

Bringing this back to Bootstrap - the entity_embed js that does exist isn't related to this issue, it seems.

dave reid’s picture

Yeah, I'm guessing this might be more related to #2826277: Rework/update dialog JavaScripts

dave reid’s picture

dave reid’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2800221: Breaks entity_embed AJAX

I'm going to go ahead and close this as a duplicate of #2800221: Breaks entity_embed AJAX since it's definitely the bug at play here with Entity Embed, with more details.

rachel_norfolk’s picture

Yeah - I'm happy with that