Remove a term from content

adpo - September 15, 2009 - 09:39
Project:Rules
Version:6.x-1.x-dev
Component:Rules Engine
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Remove a term from content is not working. Not sure why.

Tested with: 6.x-1.1 and 6.x-1.x-dev
Tested with patch: [456328#comment-1639754]

My workflow is:
Load a vocabulary
Load a term
Remove a term from content

PS. I can assign term to content with no problem:
Load a vocabulary
Load a term
Assign a term to content

#1

klausi - September 22, 2009 - 23:18
Component:Forms Support» Rules Engine

Does not seem to be Rules Forms related.

#2

adpo - September 23, 2009 - 10:21

Indeed, It is not about Rules Forms but Triggered rules. Does anyone had a similar issue with rules and found an answer? Thank you for reply.

#3

scholesy - October 9, 2009 - 17:47

what I did was make a call to:

taxonomy_node_delete(..)

in function rules_action_taxonomy_term_remove_from_content(..) in taxonomy.rules.inc instead of all the things that the function is originally doing, and that seems to fix the problem.
hope this helps.

#4

adpo - October 10, 2009 - 15:33

Thank you I will try

#5

costas - October 13, 2009 - 12:53

Hi scholesy ,
I have the same problem,
How did you make this call (taxonomy_node_delete(..))
Can you provide a more detailed code?

#6

scholesy - October 14, 2009 - 16:54

OK, what I did was just replace what was inside function rules_action_taxonomy_term_remove_from_content, so the function now is simply:

/**
* Action: Remove a term from content.
*/
function rules_action_taxonomy_term_remove_from_content($node, $taxonomy_term, $settings) {
taxonomy_node_delete($node);
}

Hope this helps.

 
 

Drupal is a registered trademark of Dries Buytaert.