taxonomy not updated when using workflow_fields
| Project: | Workflow Fields |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | kratib |
| Status: | closed |
Jump to:
From what I can tell (haven't had time to test extensively), if you:
1. use workflow_fields to set permissions (hide/make read only) on a cck node
2. have taxonomy/categories enabled on that node
3. try to edit the terms on that node during a state where fields are hidden/read only
It will not update the terms. It appears to be the same issue as cited here:
http://drupal.org/node/114513
For a temporary fix I applied the updated patch from above to taxonomy.module and node.module, and then around line 238 of the workflow_fields.module I changed:
$node = node_load(array('nid' => $nid));
to:
$node = node_load(array('nid' => $nid), NULL, TRUE);
That seems to have resolved the issue, but is a rather clunky and unsustainable fix. I would be really interested if anyone had a better solution that didn't involve hacking core =)
Brian
--
Brian Hiatt
Civic Pixel

#1
Fixed. Thanks for the great bug! Please verify and close.
FYI, what I did was to explicitly set the $node->taxonomy to $form_values['taxonomy'] so that node_save() would do the right thing.
#2
Automatically closed -- issue fixed for two weeks with no activity.
#3
Thanks kratib, I've tested this fix on two sites now and everything is going well!