Needs review
Project:
Save As Draft
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2010 at 21:28 UTC
Updated:
23 Sep 2011 at 20:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
djac commentedSave As Draft creates a draft by saving a record to the node_revisions table. Essentially it is a node object with the same nid, but a new vid.
Regardless of whether or not the node is marked to be a draft, the menu item is updated. This is the issue. Furthermore, the path is also updated (if you're using Pathauto). The menu system and Pathauto do not keep track of the vid.
When editing a draft, the menu settings are blank as it attempts to load the node_revision (draft), which is disassociated from the menu item. Filling in the menu settings then creates a duplicate menu item which is associated with the node_revision (not the actual node). After coming out of draft mode, the original menu item is restored. This is very confusing.
Ideally, Save As Draft would manage changes to menu items or paths, but this could be a significant undertaking.
Instead I propose that Save As Draft does not allow users to modify the menu or path of a node while it is in a draft state.
Whether or not this is the right solution is up for debate, but I think it's a good starting point to avoid menu items and paths from being broken.