Problem/Motivation

We have a custom Blob field in one of our field collection on a node. And we want to hook in and display a diff view of that blob under Revisions for a node.

But because field collection do not have a alter hook for field_diff_view for its field (as diff normally has) we can not do it.

Steps to reproduce

- Create a string field for a field collection under a node.
- Create a node and enter value "A" in field collection field.
- Update node an enter value "B" in field collection field.
- Go to view /node/[nid]/revisions and compare last versions
- Create a hook for hook_field_diff_view_alter and see that field_collection field is not triggered in hook

Proposed resolution

Add similar alter hook as Diff module.
See diff.diff.inc and row 148.
drupal_alter('field_diff_view', $new_values, $new_items, $new_context);

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Comments

kristofferwiklund created an issue. See original summary.

kristofferwiklund’s picture

Status: Active » Needs review
StatusFileSize
new583 bytes

Patch for adding alter hook.

renatog’s picture

Status: Needs review » Reviewed & tested by the community

This hook on #2 really works well

renatog’s picture

Status: Reviewed & tested by the community » Fixed

Fixed. Moved to the dev branch

Thank you so much

Status: Fixed » Closed (fixed)

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