The entity-embed-container.html.twig template doesn't seem to be producing the necessary "data-quickedit-entity-id" attribute causing a JS error. Attached is a patch which has resolved this for me.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screen Shot 2022-10-21 at 3.10.19 PM.png | 156.79 KB | hershey.k |
| #11 | Screen Shot 2022-10-21 at 3.11.13 PM.png | 50.83 KB | hershey.k |
| #11 | Screen Shot 2022-10-21 at 3.11.56 PM.png | 149.45 KB | hershey.k |
| #2 | entity_embed-missing-quick-edit-attributes-3011228-8.patch | 697 bytes | leslie.cordell |
Issue fork entity_embed-3011228
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
leslie.cordell commentedComment #3
leslie.cordell commentedComment #4
leslie.cordell commentedComment #5
wim leersComment #6
wim leersThis patch works. But it's duplicating logic from
quickedit_entity_view_alter(). Ideally, we'd be able to not do this and just havequickedit_entity_view_alter()do this for us. I wonder if we can change Entity Embed's rendering logic instead (in\Drupal\entity_embed\EntityEmbedBuilder::buildEntityEmbed()I'm guessing?).Comment #7
wim leersTypo 😅
Comment #8
wim leersUhm, actually, this already works fine in HEAD without this patch. This only works when using one of the "view mode"
@EntityEmbedDisplayplugins, because those have actually been rendered through the usual entity rendering pipeline.Comment #11
hershey.k commentedI'm still seeing this patch being necessary in my use case when using output from the
modules/contrib/entity_embed/templates/entity-embed-container.html.twigtemplate within a paragraph field.In my use case, I'm using the paragraph entity embed module as the entity embed is within a paragraph field, but I am not sure if this is the cause specifically for this issue or not.
See below output screenshots without patch and with patch from merge request https://git.drupalcode.org/project/entity_embed/-/merge_requests/16
Missing attribute error:


Correct output:

Comment #12
hershey.k commentedComment #13
hershey.k commented