I installed the rules modules and set up a rule set to add a vocabulary when an new Event (content type) is created.....It is also set to assign the newly created vocab to the new Event.......but I get a error and it has to do with creating the new vocabulary... Here's the messages

An error occurred during rule evaluation. It follows the evaluation log:

* 0 ms "After saving new content" has been invoked.
* 0.085 ms Executing the rule "add private vocab to new event" on rule set "After saving new content"
* 0.262 ms Condition "Created content is Event" evaluated to TRUE.
* 0.369 ms Action execution: "Create private vocab when new event is created"
*
o 1.058 ms "Create private vocab when new event is created" has been invoked.
o 1.12 ms Executing the rule "event created" on rule set "Create private vocab when new event is created"
o 1.254 ms Condition "Content is new" evaluated to TRUE.
o 1.355 ms Condition "Content is Event" evaluated to TRUE.
o 1.446 ms Action execution: "Add a new vocabulary"
o 6.288 ms Unknown variable name "taxonomy_vocab" return by action "rules_action_taxonomy_add_vocab".
o 6.373 ms Warning: Unable to get argument "1".
o 6.406 ms Element "Assign vocabulary to group" has not been executed. There are not all execution arguments available.
o 6.443 ms Evaluation of "Create private vocab when new event is created" has been finished.
* 6.507 ms Evaluation of "After saving new content" has been finished.

when I look at the list of vocabularies under taxonomy under content management the new vocabulary is created but the name is blank

Comments

markusa’s picture

I am using a replacement token for the vocab name.....[node:ogname-raw] listed under replacement tokens....basically I want the new vocab name to be the same as the name of the Event custom content type which I am using as a Group Node.

When I use "[node:ogname-raw] People" has the name of the vocab to be created I get a newly created vocab under taxonomy with the name People.....Its like the replacement tokens aren't working at all.....

Either way replacement tokens or not.....I get a vocabulary created under Taxonomy but it will not be assigned automatically to the new Event content type.

By the way this is one of the most excellent modules for Drupal....its power and versatility is fantastic......I was surprised how fast I was able to set up triggers to conditions......

Now if I could only get create of a new vocabulary to work when a new content type is created

markusa’s picture

Using Drupal 6.19
Organic groups 2.1 with Organic Groups Vocabularies 1.1
at first token 1.13 then upgraded to token 1.15 with same results...

cck 2.8

Views 2.11

Most modules installed are the latest....

markusa’s picture

Priority: Normal » Major
markusa’s picture

Priority: Major » Critical

I'll give you any info, logs, version numbers, you'll need to help me figure out this little problem....

the reason I made an issue of it is because when I posted this in the forum someone recommended it sounded like a bug and I should post an issue.

Here's teh forum post http://drupal.org/node/943820

markusa’s picture

Here are the results of some trial and error experimentation.
I have taken away the second action of assigning the vocabulary to the newly created event(group node)

1.

I had created a rule named "event created" to be triggered when a new event content type(also a group node) is created. Had some conditions on the content being new and the content type type being event....then if the conditions are true it takes two actions...one creates a new vocabulary and 2. assigns that new vocabulary to the new event(group)

On the page with the properties for the action create vocabulary I was using the token [node:ogname-raw] for the vocabulary name field in the vocabulary settings group and the same for the label field in the group that was called "Variable [node:ogname-raw] settings"

the machine readable variable name field I have entered "persons" , of course without the quotes.

With the rules set this way I get the error log shown above, a taxonomy is created in the list but it has no name, and it is not assigned to the new group.

2.

I changed the token used for the vocabulary name field and variable settings group label field to [node:title-raw]
Now I get the same errors as above but the new vocabulary listed on the taxonomy page has a name and it is the node title....

3.

I changed left the token used for the vocabulary name field as was and changed the variable settings group label field to peoples
A new taxonomy was created with the name Test Wedding People.....which is what it should be......why is there an error if everything appeared to work??

Here's the errors:
* 0 ms "Content is going to be saved" has been invoked.
* 0.087 ms Executing the rule "add private vocab to new event" on rule set "Content is going to be saved"
* 0.27 ms Condition "Created content is Event" evaluated to TRUE.
* 0.383 ms Action execution: "Create private vocab when new event is created"
*
o 1.3 ms "Create private vocab when new event is created" has been invoked.
o 1.364 ms Executing the rule "event created" on rule set "Create private vocab when new event is created"
o 1.501 ms Condition "Content is new" evaluated to TRUE.
o 1.603 ms Condition "Content is Event" evaluated to TRUE.
o 161.686 ms Action execution: "Add a new vocabulary"
o 170.223 ms Unknown variable name "taxonomy_vocab" return by action "rules_action_taxonomy_add_vocab".
o 170.285 ms Evaluation of "Create private vocab when new event is created" has been finished.
* 170.379 ms Evaluation of "Content is going to be saved" has been finished.

4. Now I add back the action of assigning the new vocabulary to the new event group node.

I set arguments configuration as follows:
group: content ( the only choice in the select list)
Taxonomy vocabulary that will be assigned to group: Peoples

strange that the variable for label set in the creation of the vocabulary was lower case and the option that appears when assigning a new vocabulary the first letter is uppercase

The resulting errors are the same except a copule at the bottom because the assigning new vocab action could not be executed because of lack of proper arguments....exact error was given in error list or original post here....

So when I create a new event type, the vocabulary is created, named properly, but for some reason won't create or pass the right argument so that it can be assigned to the new group just created.

markusa’s picture

I've even tried creating an action add term after the create vocabulary option and the same error log occurs. The vocabulary is created but the term is not added to it.

markusa’s picture

After 4 hours of continual trial and error I have gotten it to work

I was creating a rule set that had conditions of saving content type and that it was new and actions of create vocab and assign it to group.

I then created a triggered rule that had the same conditions and then as the action called the rule set I had saved described above.

So basically the trigger resulted in going through 2 sets of the same conditions before the one set of resulting actions were initiated. and Somehow the module got confused and executed the first action (creation of vocab) but and error due to the confusion in the module wouldn't all the execution of the next actions.....

When I deleted it all and started over I made one triggered rule that had the proper conditions of new group node created (custom content type event) and this being true the rule engine created a new vocabulary and assigned it to the new group node Event.

This is a great module...I hope I've shown some light on an obscure bug....

A block even showed up or was already there which shows the people tags for each group vocabulary automatically.

Thanks for all your hard work designing this awesome module

markusa’s picture

Now wait a minute......I tried it again for another category: location. I cloned the rule and then changed the content type to gallery instead of event and changed the vocab to appear to on gallery node types instead of images....Oh I changed the Machine readable variable name and the label under the variable locations section.

Nothing else is changed.....what's weird is the machine readable variable name is now taxonomy_vocab_locations but the error message doesn't say anything about that....it still refers

An error occured during rule evaluation. It follows the evaluation log:

* 0 ms "After saving new content" has been invoked.
"1st Rule this is working still and give correct result"
* 0.075 ms Executing the rule "Adding a group vocabulary when event is created" on rule set "After saving new content"
* 0.233 ms Condition "Created content is new" evaluated to TRUE.
* 0.346 ms Condition "Created content is Event" evaluated to FALSE.

"2nd rule showing wrong Machine readable variable name and giving the error"
* 0.404 ms Executing the rule "Adding a new location vocab for the gallery group" on rule set "After saving new content"
* 0.531 ms Condition "Created content is new" evaluated to TRUE.
* 0.634 ms Condition "Created content is Gallery" evaluated to TRUE.
* 1.083 ms Action execution: "Add a new vocabulary"
* 5.661 ms Unknown variable name "taxonomy_vocab" return by action "rules_action_taxonomy_add_vocab".
* 5.749 ms Warning: Unable to get argument "1".
* 5.782 ms Element "Assign vocabulary to group" has not been executed. There are not all execution arguments available.
* 5.826 ms Evaluation of "After saving new content" has been finished.

markusa’s picture

I tried a different approach....

Instead of creating another rule when a gallery node is created I decided to add more actions to the rule when an event node is created.

So now I have 4 actions that take place when a new event node (a group node) is created
1. create people vocabulary
2. assign people vocab as group vocabulary to event
3. create location vocabulary
4. assign location vocab as group vocabulary to event

the people vocabulary is created and assigned properly as reported above....but the location vocab is not.....

same exact settings except for the Machine readable variable name and the label under the variable locations section. Also the location vocab is for the images and galleries where the people vocab is for image nodes only. Here's the error thats reported...strange its in a green box now instead of a red.

*
o 0 ms "After saving new content" has been invoked.
o 0.097 ms Executing the rule "Adding a group vocabulary when event is created" on rule set "After saving new content"
o 0.277 ms Condition "Created content is new" evaluated to TRUE.
o 0.388 ms Condition "Created content is Event" evaluated to TRUE.
o 31.595 ms Action execution: "Add a new people vocabulary"
o 34.882 ms Successfully added the new variable "peoples"
o 35.041 ms Action execution: "Assign people vocabulary to group" /* this is successful */

o 36.876 ms Action execution: "Add a new location vocabulary"
o 44.842 ms Warning: Unable to get argument "1".
o 44.881 ms Element "Assign location vocabulary to group" has not been executed. There are not all execution arguments available.
o 44.962 ms Evaluation of "After saving new content" has been finished.
* Event Latham Wedding has been created.
* No posts in this group.

I made the machine readable variable vocab_loc instead of the default taxonomy_vocab which is the variable for creating the people vocab.

fago’s picture

Category: bug » support
imjohnbon’s picture

I think this is the same exact bug I am having. Anyone have any updates? Markusa did you get it working?

majdi’s picture

same exact bug i'm facing
but this bug from og_vocab module or rules ?

mitchell’s picture

Category: support » bug
Priority: Critical » Major
Status: Active » Closed (cannot reproduce)

Closing this old issue. Please reopen with greater detail if the need arises.

mitchell’s picture

Component: Provided Rules integration » Rules Core

Updated component.