When a field got updated by using field_attach_update , the module should mark the entity as needing re-indexing.

Comments

tungscit’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
tungscit’s picture

Attached is a patch.

tungscit’s picture

Status: Active » Needs review
nick_vh’s picture

Looks good, if someone can confirm this helps them we should mark it as RTBC

pwolanin’s picture

Looks good - or at least harmless enough! however, what's the use case - a field getting updates not in the context of a entity save?

I'm worried we'll be marking every entity 2x or more.

nick_vh’s picture

Status: Needs review » Needs work

The api states :

"This hook is invoked after the field module has performed the operation." and the field_attach_update function seems like an official API call that can be executed individually next to entity_save, delete, etc...

Should we add some static code that once a node is marked once per page load we do not mark it again?