Closed (cannot reproduce)
Project:
Entity Embed
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2019 at 11:42 UTC
Updated:
9 Jul 2024 at 01:41 UTC
Jump to comment: Most recent
Comments
Comment #2
oknateComment #3
oknateI think I have a fix here:
https://www.drupal.org/files/issues/2019-06-01/3037316-18.patch
Comment #4
oknateClosing in favor of #3037316: Show an outline around the <drupal-entity> element within CKEditor
Comment #5
oknatereopening. Although I think I have a fix for both issues in 3037316, comment 18
Comment #6
oknateI'm now having trouble recreating the bug. Although I definitely saw it earlier today.
Comment #7
oknateI'll reopen this if I see it again and have steps to reproduce. Right now I can't get it to happen.
Comment #8
generalredneckI'm totally having this issue but I haven't went through the process of debugging to see where the breakdown is coming into play. THere are also a lot of variables in my case including, varbase_media, blazy, and the like.
Comment #9
oknateIf you can create steps to reproduce, please do. Perhaps we'll reopen it.
Comment #10
eahonet commented@oknate I'm running into this on D9 with Bartik theme. If I add a caption to an image, the alignment is honored with
<figure role="group" class="caption caption-drupal-media align-center">. Without that, no is outputted and no alignment given in html.I'm wondering if you found a solution to this.
Comment #11
tlwatsonTo anyone still coming across this... I was able to fix the problem by reordering my "filter processing order".
Specifically, if you have "Limit allowed HTML tags and correct faulty HTML" enabled, then it must come before "Align images" and "Caption images". Looking at the filter details, I think the problem is that the IMG element allows all the needed "data-" attributes for align/caption, but does not allow the "class" attribute. So you don't want to convert the data- attributes to classes and then get them stripped out.
If for some reason you have to bypass this instead of reordering you could probably add
<img class>to your manually editable tags, but I doubt that's right for most scenarios. If you have any other data-* filters to process, they should probably go after the HTML filter too.