If you select just the child, the module does its job, creates a path with the full taxonomies. Then, select the root or parent, and also the child. Then the module just returns the path to the parent, not including the child.

Example, select:

-puschairs x
-- all terrain x

The module will just return in the node: puschair/my-title

Select now just the child:

-puschairs
-- all terrain x

Then the path is right:

puschair/all-terrain/my-title

In some scenarios we need to select both, child and parent, and the right path is obviously the full path.

CommentFileSizeAuthor
#1 1978436-rootchild-select.patch2.57 KBalexmoreno
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexmoreno’s picture

Title: taxonomy path not correct when selected a child and a parent » patch: taxonomy path not correct when selected a child and a parent
Status: Active » Patch (to be ported)
FileSize
2.57 KB

and here is the patch. The sql query was too simple, I have added a function to return the deepest child of those selected, so if you select both, root/parent and child, it will return the child as an object $term.

alexmoreno’s picture

Priority: Normal » Major
Status: Patch (to be ported) » Needs review

Status: Needs review » Needs work

The last submitted patch, 1978436-rootchild-select.patch, failed testing.