Closed (fixed)
Project:
Workbench Access
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2011 at 18:36 UTC
Updated:
29 Nov 2011 at 15:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
stevectorHave you seen this issue? #1087044: Custom URL path settings do not survive moderation
Are you using Workbench Moderation?
Comment #2
Pablo Gosse commentedI had it enabled in my initial install where I encountered the same behaviour. I did not have it enabled in the install from which I outlined the steps listed above.
I just enabled it and the behaviour is the same. Add a page and it gets aliased to unassigned/node-title. Edit the page and the Automatic alias checkbox is not checked. Check it, save, and the alias is updated to museum/node-title. On subsequent edits the Automatic alias checkbox is checked.
If there is any other info you need or anything you'd like me to test please let me know.
Thanks,
Pablo
Comment #3
stevectorAre you using Pathauto Persistent State? Your issue sounds similar to the one described in #1087044: Custom URL path settings do not survive moderation
Comment #4
Pablo Gosse commentedSorry, forgot to include my reply to your question about the previous issue. Yes, I saw that issue but felt that it wasn't the same issue since in my situation the problem is being encountered upon first creation of the page, not on page revision. I am selecting 'Automatic alias' when creating the page, but the alias isn't getting created correctly using the [node:workbench-access-sections] token.
Am I incorrect in thinking this?
Thanks,
Pablo
Comment #5
Pablo Gosse commentedNope. I've not seen the Pathauto Persistent State module. I'll install it and see if that rectifies the situation.
Thanks,
Pablo
Comment #6
Pablo Gosse commentedTried using Pathauto Persistent State. Same result, the alias museum is not being set on creation and is instead set as Unassigned.
Thanks,
Pablo
Comment #7
stevectorThis sounds like an issue of Workbench Access tokens not working until after the node is created.
Comment #8
stevectorI don't fully understand the difference between $node->workbench_access and $node_workbench_access_id. Switching to the latter seems to fix this particular issue.
This comment in workbench_access_node_insert() suggests to me that one of these arrays should be eliminated.
Comment #9
Pablo Gosse commentedYep, I've been playing around with this since late last week and suspected it was related to the tokens. That had previously led me to this issue, http://drupal.org/node/1237284#comment-4876508, which seems to be related and raises the exact question that you raise around $node->workbench_access and $node_workbench_access_id.
I'm still pretty new to Drupal and the university where I work is currently evaluating a few products as candidates for our new CMS (Drupal and two others). Sorry I wasn't able to dive more deeply into the code to help fix the issue but being new to Drupal and still in the evaluation process my time is limited with this (I'm the only web developer here).
Thanks so much for your prompt replies and the fix. I'm really hoping we select Drupal as it will provide me the opportunity to get more deeply involved with the project.
Thanks,
Pablo
Comment #10
agentrickard@stevector see #1252460: Node property mis-matches between node_load() and node_save() for details about the code comment in #8.
Comment #11
dave reidThis is a better fix in the meantime until #1252460: Node property mis-matches between node_load() and node_save() is fixed.
Comment #12
dave reidComment #13
dave reidThe patch in #8 will cause a regression if you are using just node_load() and node_save() directly as $node->workbench_access_id does not exist from a node_load().
Comment #14
bneil commentedThe patch in #12 works for me.
Comment #15
dave reidMarking as RTBC as per #14.
Comment #16
dave reidCommitted #12 to Git. Thanks all!
http://drupalcode.org/project/workbench_access.git/commit/5e6ddfc