Hi! I'm working with Drupal 6 to create a feed collecting site. I import the original feeds via the feeds module and copy their tags. But I also want to assign a category (terms from second taxonomy) according to the author name to be able to divide the content in a unified way.

I want to use the rules module (rules-6.x-1.2) to assign these categories upon import. I use the following steps:

ON event Content is going to be saved

IF textual comparison ([node:author-name], TheAuthorName)

DO Modify node taxonomy terms (saved content, permanently, add the selected terms)

I select the terms to be added as "-none selected-" for tags and "TheCategory" for categories.

Now, when I import the feed, the category "TheCategory" is added to the content, but the tags vanish.

This happens also if I select "Replace existing terms with selected ones" or "Replace terms within same vocabulary" for the action. Upon editing, always the radio button of "add …" is selected, regardless of what I entered previously. And yes, I clicked on "save".

Is this the right way to do what I want? Why isn't it working? Could I do this with another module maybe (I don't need rules for anything else …)?

Thanks for your help!

Comments

PiHalbe’s picture

Component: Rules Core » Rules Engine
Priority: Normal » Minor

Ok, so I found out that the right trigger to do this is "new content is created" (which I somehow couldn't get to work beforehand).

So, I ran the rules module in debug mode and found that the rule was triggered, the filter returned TRUE and the modify node taxonomy action was successfully accomplished. But the taxonomy was entirely unchanged.

I played around a little and postponed a "save content" action on the newly created content. Turns out, this fixed the problem and now everything works as I intended.

Still, there are some flaws:

* I checked "permanently apply changes", but it did not do anything.
* I unchecked "permanently apply changes", but upon editing again, the box was checked again (probably the setting was not saved to begin with)
* The same holds true for the radio buttons for the type of "modify node taxonomy" action which was obviously not saved

Maybe this can help someone.

ea777’s picture

I'm having the same problem here. Rules will not save the taxonomy terms I tell it to in the action.

Essentially I have conditions set up that I've tested and work fine. Then in my actions I "load content by id" which also works fine. The next and final action is "modify node's taxonomy terms." It doesn't matter what I select here (replace, add, delete) or even what terms I select, nothing workls. The terms are never modified from their previous state.

Any ideas?

Thanks in advance for your time!

ethnovode’s picture

Version: 6.x-1.2 » 6.x-1.3

I have the same problem with 1.3.

When updating or saving content, I have 7 actions :
- Modify taxonomy terms -> add select terms (permanently apply changes)

When using devel it seems that only the last terms has been added and every other terms have been erased from the node.

ju.ri’s picture

I have a similar issue here. I have a view set up as a "rules views executor" (http://drupal.org/project/rules_views) to call up an "add term to node" action for a list of terms.
The view ist called from php directly from the node. Everytime the script is run, I see it looping through the terms (I have a message displayed each time for checking), but only one term is actually added. So for adding 5 terms to the node, the script has to be run 5 times.

Ravi.J’s picture

I know this is fairly old, however to help someone in future with similar requirements,

Solution would be to add multiple actions

Action 1: Load term ( in this you can select the vocabulary /
Action 2: Once the action "Load term" is executed , you will see a new action "Add term to content"

shriji’s picture

Ravi, your solution worked like a charm!!!!! Thanks a bunch!!!

TR’s picture

Component: Rules Engine » Rules Core
Issue summary: View changes
Status: Active » Closed (outdated)

Taxonomy is handled entirely differently in D7, and D6 is no longer supported.