If you publish a node with workbench moderation and then create a new draft, token replacements are not updated with the latest form submission values as you subsequently edit the new draft.

This appears to be down to metatag_entity_view() reloading the entity. The block of code was originally in a hook_field_attach_view_alter() function which may well have needed that, but I can't see any need for it now that's been replaced with a hook_entity_view() implementation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Adrian Richardson’s picture

Status: Active » Needs review
FileSize
837 bytes

Patch attached for review

Adrian Richardson’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 1: workbench_draft_token_replacement-2199533-1.patch, failed testing.

jeffdiecks’s picture

Issue tags: +Needs reroll
DamienMcKenna’s picture

Status: Needs work » Needs review
Issue tags: +SprintWeekend2015
FileSize
895 bytes

Rerolled. Note: this needs some solid reviewing.

DamienMcKenna’s picture

Issue tags: -Needs reroll
rooby’s picture

I had a problem that sounded similar to this one but the patch didn't fix it so I opened a new issue #2467587: Problem with Workbench Moderation and Metatag caching.
If that is actually a duplicate I can close it.

DamienMcKenna’s picture

Can someone please test if the current -dev release fixes this problem?

mairi’s picture

FileSize
897 bytes

The current -dev release doesn't fix this problem for us.
Attaching re-rolled patch for metatag latest version (no changes, just re-rolled for line numbers).

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

DamienMcKenna’s picture

FYI this has been released in the new v7.x-1.7.

Status: Fixed » Closed (fixed)

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