Skip to main content
Tweeted twitter.com/StackDrupal/status/1535049176702124038
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
deleted 84 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I know this question was asked before here or here but never answered.

In Drupal 7 we were able to use field_attach_update($entity_type, $entity) to update fields without having the need to update the whole node. $node->save() is very heavy and calls many hooks in between.

With the coming of Drupal 8, field_attach_update was deprecated. Is there an alternative to it, and what is it if yes?

In my case I'm updating two image fields programatically and don't want to call $node->save in order to not trigger all the other hooks.

I know this question was asked before here or here but never answered.

In Drupal 7 we were able to use field_attach_update($entity_type, $entity) to update fields without having the need to update the whole node. $node->save() is very heavy and calls many hooks in between.

With the coming of Drupal 8, field_attach_update was deprecated. Is there an alternative to it, and what is it if yes?

In my case I'm updating two image fields programatically and don't want to call $node->save in order to not trigger all the other hooks.

In Drupal 7 we were able to use field_attach_update($entity_type, $entity) to update fields without having the need to update the whole node. $node->save() is very heavy and calls many hooks in between.

With the coming of Drupal 8, field_attach_update was deprecated. Is there an alternative to it, and what is it if yes?

In my case I'm updating two image fields programatically and don't want to call $node->save in order to not trigger all the other hooks.

removed "Drupal" from the title; removed tags from the title
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Alternative to field_attach_update for Drupal 8

Source Link
113408
  • 326
  • 3
  • 13
Loading