The get_latest_revision method in state_flow_entity expects that the revision-key is a synonym for revision order.

Since the switch to using Drafty, this is no longer correct: when a new draft of a published revision is created, the published revision is re-saved with a higher vid than the draft, even though the draft is the most recent revision. Revision order should be determined using the timestamp, NOT vid.

The header comment for get_latest_revision indicates that the function is considered deprecated (I presume 'active revision' is the preferred concept, rather than 'latest'?), but the workbench_moderation module is still using it to generate metadata messages that are displayed at the top of a node-revision page. That header information is no longer correct.

Comments

LittleRedHen created an issue. See original summary.

LittleRedHen’s picture

Status: Active » Needs review
StatusFileSize
new790 bytes

Here's a patch that uses the revision-timestamp to determine the latest revision, rather than revision-id. It should help until dependent modules can all be made to stop using the deprecated 'latest' property.

  • das-peter committed bfddb9d on 7.x-3.x authored by LittleRedHen
    Issue #2592035 by LittleRedHen: The get_latest_revision function returns...
das-peter’s picture

Status: Needs review » Fixed

Thanks for catching this.
Fixed.

Status: Fixed » Closed (fixed)

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