Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
below code in a custom module is not recomputing the computed field value.
$node = node_load($nid);
node_save($node);
Comments
Comment #1
TechNikh CreditAttribution: TechNikh commentedFYI I am using workbench for revisioning. will that cause any conflict?
Comment #2
TechNikh CreditAttribution: TechNikh commentedMy bad. The php code I had for the field was using menu_get_active_trail() function and that was not returning expected output when run by custom script.
fixed my code by making it independent of menu_get_active_trail
Comment #3
liquidcms CreditAttribution: liquidcms commentedno, this isn't fixed - this does not work and breaks numerous things (vbo for example) from being able to work on any nodes which use computed fields.