This happens, for example, under certain conditions when using a file field controlled by the File Entity module. Because each time the field is rendered, a new HTML ID is generated, the diff between the old and the new entity will look something like this:
- <div id="file-205"...>
+ <div id="file-205--1"...>
which is not an actual change between the two versions of the entities and which therefore should not be displayed as a diff.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | diff-2399579-2-ensure-drupal_html_id-cache-is-identical-for-comparisons.patch | 894 bytes | alan d. |
| #1 | diff-drupal-html-id-2399579-1.patch | 1.33 KB | David_Rothstein |
Comments
Comment #1
David_Rothstein commentedHere is a somewhat generic fix.
Comment #2
alan d. commentedNice, slightly altered. Few assignments appeared unnecessary, we have the static cache reference already; and after the comparison, I didn't see the need to revert to pre-comparison ID cache :)
Comment #5
alan d. commented