Update / Resave all Entities

Created on 14 August 2015, over 9 years ago
Updated 29 November 2023, about 1 year ago

Since VBO offers already the possibility to resave all nodes, it would be an awesome feature to be able to resave/update entities as well.

Having this feature would make it possible to bulk update Geocoder Fields, etc.

In the meantime, I found out how to do it via the "Execute arbitrary PHP" action. Here is the code:

$entity_type = '{ENTITYTYPE}';
$wrapper = entity_metadata_wrapper($entity_type, $entity);
$wrapper->save();

Replace {ENTITYTYPE} with your entity type. Use the Devel module to find the entity type on any entity page by adding "/devel" to the end of the URL.

I hope this helps those looking for a workaround in the meantime.

Feature request
Status

Needs work

Version

3.0

Component

Actions

Created by

🇩🇪Germany NWOM

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    @Graber: fro what I know core had previously only Node Bulk Actions? Does it has Entity Bulk Actions now too? If so, then you would be right.

    Apart from that: does this need a reroll for Drupal 10/11 and PHP8 ?

  • Status changed to Needs work about 1 year ago
  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Assuming a bright future for more other entities than nodes in Drupal, I set it to major FR and NW.

Production build 0.71.5 2024