This looks more like a bug to me but I'm fairly new to this and I'm surprised no-one else has raised it if it is...

Overriding hook_field "presave" event. I'm making changes to the node parameter but the changes are being overwritten in the _content_field_invoke function. The cause is easy to see: _content_field_invoke caches the value of the field in $items, then invokes the module function and finally overwrites the field with the cached $items.

If this is by design then the node parameter on hook_field shouldn't be by reference as this is inconsistent with what's actually allowed.

If I've misunderstood can you help?
Thanks.

Comments

idontknowtheanswer’s picture

Priority: Normal » Critical