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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | state_machine-state_flow_entity-latest-2592035.patch | 790 bytes | LittleRedHen |
Comments
Comment #2
LittleRedHen commentedHere'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.
Comment #4
das-peter commentedThanks for catching this.
Fixed.