Closed (fixed)
Project:
Workbench Moderation
Version:
7.x-1.0-beta5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2011 at 21:10 UTC
Updated:
21 Jun 2011 at 23:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
dave reidGoing to mark #1085228: Manually entered URL not sticking through Moderation as a duplicate of this one. What I think is going to have to happen is we'll need either code in workbench_moderation or some kind of workbench_alias_revisions module that adds support for revision-able aliases. This is such a sore spot in core and I'm going to fix this in D8.
Comment #2
eatingsThis is a pretty major bug especially if you are using menu to define sections. Also, this is not really a UI issue...
Comment #3
agentrickardThis is a core limitation that we need to find a solution for.
Certain things in Drupal are simply not revisionable (Menu, Path), which creates these problems. I wonder if we could register those with a module (Workbench Revisions, as Dave suggests) to overcome the limitation.
For now, moving to Workbench Moderation, since this really bites us when that module is enabled. (Note, however, that Workbench Access is deliberately stateless and will likely remain so.)
Comment #4
dave reidMarked #1085228: Manually entered URL not sticking through Moderation as a duplicate of this issue.
Comment #5
agentrickardI don't think this needs actual revisioning, I just think that pathauto is form dependent in some ways we need to fix.
Comment #6
dave reidFiled a D8 core issue - #1154180: Make URL aliases revisionable
Comment #7
agentrickardHere's a patch which does two things (bad, perhaps).
1) Ensures that $node->path is loaded during moderation. Core doesn't use path_node_load() and sometimes hilarity ensues.
2) Moves the moderated version save routing to drupal_register_shutdown_function(). This means we don't have to call node_save() during node_save() and helps protect data that is _not_ subject to revisions.
Comment #8
agentrickardSlight revision to remove reference to a deprecated function in the docblock.
Comment #9
kirby14 commentedThis patch breaks functionality using the drupal_register_shutdown_function(). The live revision is no longer staying live. As soon as I create a new revision, it is automatically set to the current published revision.
This block of code seems to be the main factor in a lot of the issues for this module.
#1084436: doesn't seem to handle file attachments at all is dealing with this exact issue as well.
Comment #10
agentrickardIt doesn't look like the shutdown function is getting called.
You should see log messages. I don't.
Comment #11
agentrickardAh, faulty understanding of how arguments are passed to the shutdown function.
Try this one.
The problem (as I see it), is the node_save() which may happen within a node_save(). This approach tries to bypass that issue.
(The other way to view the issue is that Drupal core's inconsistent use of revisions and node_load() properties cauases all kinds of problems that we have to work around.)
Comment #12
kirby14 commentedThe last patch does restore functionality, I didn't test to see if it actually fixes the URL path issue though.
Unfortunately this doesn't fix the file attachment issue I linked above but since this patch isn't for that issue, no big deal.
I do agree with your statement about revisions, node_load and the nested node_saves causing a lot of issues, though... that is why I assumed this would fix the attachment issue as well. I'll look in to it further and see if we can build off of this to fix that.
Comment #13
mfer commentedThe path is being saved between revisions and it applies cleanly.
Comment #14
mfer commentedAlso note, I'm using http://drupal.org/project/pathauto_persist too. If you are using pathauto you have to have this or you cannot manually set a path. pathauto and workbench moderation will always trump your custom path without pathauto persist.
Comment #15
becw commentedThanks, everyone. I've committed the patch from comment #11 in d4487.