Is there a way to exclude some fields from the revision diff ? There are some cases where at each revision a random number is added to the field, so I want see that fields but I don't wand my users to see them in the revisions.
Is is therefore possible to hide some fields from being "diffed" ?
In general how to get a higher control on what diff output ? If I have a field field_myfield is there a way to have a hook on the specifi field_myfield to fine tuning how to perform diff on it ?

Comments

alan d.’s picture

Status: Active » Fixed

The view modes should help with the first bit, if you need better logic, try the alters.

These are run after the field is diff'ed. The context should have all of the info you need.

      // Allow other modules to act safely on behalf of the core field module.
      drupal_alter('field_diff_view', $old_values, $old_items, $old_context);
      drupal_alter('field_diff_view', $new_values, $new_items, $new_context);

Status: Fixed » Closed (fixed)

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

zilla’s picture

thanks for the tip - i did this by just using display suite and creating a custom display for "revision differences" (and you can also control the actual revision if you'd like) - it was then quite easy to remove all of the flag actions and assorted preprocess stuff that was looking ugly to users - or confusing (like the amount of garbage visible through five star when viewing in standard and not marked down!)