Set Taxonomy Parent

Created on 19 July 2024, 3 months ago
Updated 7 August 2024, 2 months ago

Problem/Motivation

I've created a model that successfully creates taxonomy terms. Said model is capable of finding the TID of the desired parent term, but I cannot figure out for the life of me how to nest the new taxonomy term under the parent. I'm using the Entity: Create New action to set the name and vocabulary of the new taxonomy term (using the parent TID as the owner doesn't work, which makes sense, it's for setting the owner of a node, but it was worth a try) ... I'm just stuck on just figuring out how to set the relation/parent term. Since the parent is not a field (that I can figure out), I can't use set field value. Any guidance you can provide would be super helpful.

💬 Support request
Status

Fixed

Version

2.0

Component

User interface

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @duqtape
  • After playing with it a lot more, it turns out that it is accomplished with set field value.

    1. Create the term with Entity: Create New setting the type to Taxonomy term: MyVocabulary and the Entity label: what I want the term to be. Create a token, ie. new-child
    2. Entity: Set Field Value: Field name: parent. Just the word 'parent'. No brackets or new-child:parent:tid or anything. Literally just the word 'parent'. Field Value: the TID of the parent. I used a token by loading the parent term first, then grabbing the TID that way.
    3. Eventually save the new term, using Set Field Value or Save entity
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Actually, parent is a field of type entity reference to the term entity. And yes, setting that with the set field value action is exactly what's needed.

    Not sure about the status of this issue, though. As you assigned it to yourself, it looks like you're dealing with it on your own, not expecting input from other, right? That field "Assigned" in issue metadata is meant to show, that someone is dealing with it. If that's filled, everyone else assumes, there is nothing to do for them.

  • I didn't mean to assign it to myself, nor do I know how I ended up doing that. I was mostly answering my own question for future reference, in case someone else was struggling with the same issue. I indeed have solved my own problem and no longer need any help.

  • Status changed to Fixed 3 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Assigning an issue happens when you select a user name in this drop-down:

    Thanks for your feedback, I'm marking this issue as fixed then.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024