taxonomy not updated when using workflow_fields

civicpixel - December 11, 2007 - 22:30
Project:Workflow Fields
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:kratib
Status:closed
Description

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

kratib - December 14, 2007 - 13:26
Assigned to:Anonymous» kratib
Status:active» fixed

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

Anonymous - December 28, 2007 - 13:31
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#3

civicpixel - January 24, 2008 - 21:36

Thanks kratib, I've tested this fix on two sites now and everything is going well!

 
 

Drupal is a registered trademark of Dries Buytaert.