I just noticed that computed fields are not recalculated during node preview.

Here's a fix that seems to work for me. Just add the following to the swicth block of computed_field_field():

    case 'sanitize':
      if ($node->build_mode == NODE_BUILD_PREVIEW) {
        _computed_field_compute_value($node, $field, $node_field);
      }
      break;

Comments

Moonshine’s picture

Title: Triggering Compute Fields code on node preview » Triggering Computed Field code on node preview
Status: Needs review » Fixed

Nice find :) Added to Drupal 6 branch... will show in the dev tarball on next rebuild.

markus_petrux’s picture

Thank you! :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.