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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein’s picture

Status: Active » Needs review
FileSize
1.33 KB

Here is a somewhat generic fix.

Alan D.’s picture

Nice, 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 :)

Status: Needs review » Needs work
Alan D.’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.