This is a follow-up to #2287805: Caption filter does not work with Quarter Size image format - or with floated captions.
Basically, if you process content that includes duplicate IDs, for example:
<div id="not-unique">First</div>
<div id="not-unique">Second</div>
... with the 'panopoly_images_fix_captions' filter, it'll generate this warning:
Warning: DOMDocument::loadHTML(): ID not-unique already defined in Entity, line: 1 in _panopoly_wysiwyg_process_caption_filter() (line 392 of /panopoly_wysiwyg/panopoly_wysiwyg.module).
This is mitigated by the fact that the Panopoly WYSIWYG text format actually won't let you specify IDs at all. So, this can only be triggered by a user defined text format which allows IDs, or by modifying the WYSIWYG text format to allow them. However, I have seen this come up on a client site!
While this is invalid HTML, we should silently ignore that if possible! Based on my research, calling libxml_use_internal_errors(TRUE)
should fix this.
Comment | File | Size | Author |
---|---|---|---|
#1 | panopoly_wysiwyg-duplicate-ids-2491521-1.patch | 1.11 KB | dsnopek |
Comments
Comment #1
dsnopekHere's a patch that works in my testing!
Comment #3
dsnopekCommitted!