I have tried several times to get a rule working where it creates a new taxonomy term in the tags vocab after a certain event. Ideally I would use it to create a duplicate taxonomy term from another vocab once it's saved. I have successfully executed other actions (sending emails, displaying system messages) but I cannot get it to ever make a new taxonomy term. I can get this to work in the D7 version without issue. I have tried with both the data selection (little documentation so I could be configuring incorrectly) and direct input mode. My basic tests of entering "Some String" into vocab of "Tags" never works but my other rule that emails me and displays a system message works fine. Thoughts?
Comment | File | Size | Author |
---|---|---|---|
#3 | cannot_create_taxonomy-2900020-3.patch | 515 bytes | shabana.navas |
Comments
Comment #2
shabana.navas CreditAttribution: shabana.navas at Acro Commerce commentedI'm getting the same behaviour for all the 'Create a new @entity_type' actions. Looking into what the issue is.
Comment #3
shabana.navas CreditAttribution: shabana.navas at Acro Commerce commentedThis one line seems to fix the issue and now the 'Create new @entity_type' actions work.
Comment #5
sbbutkcin CreditAttribution: sbbutkcin commentedI tested this patch out on a sandbox site and it causes the site to experience a 502 error every time I attempt to create a new term in any vocab list (the ones with the rule applied to it or not). On a freshly installed D8 site, it errors out with an exhausted memory error. What kind of environment were you able to successfully test this patch with?
Comment #6
TR CreditAttribution: TR commentedHere is a working Rule that creates a new Taxonomy term in the default "Tags" vocabulary when a new article node is created (the default article content type has a field_tags by default, so this Rule will work on any site, no special setup needed). The term name is the node title. This demonstrates that the "Create a new taxonomy term" action does work, and a patch is not needed. I think the key thing that you probably missed is that you have to save the term entity after you create it. That's true of all entities, and we don't want to change that because you should be able to create an entity that exists only for the scope of the rule. This is more of a UI/Documentation issue than a bug.