When editing a term with betterselect enabled, and setting multiple parents for one term, a string of errors is displayed and the term becomes not only a child of the terms you selected, but also a higher level term itself. For instance let's say you have a vocabulary entitled things with two terms, 'Round' and 'Orange'. The Orange term has a child term of Basketball. Like this:
Things
-Round
-Orange
--Basketball
If I edit the Basketball term and check the box for 'Round' as well, I receive a string of duplicate errors akin to:
user warning: Duplicate entry '10-0' for key 1 query: INSERT INTO term_hierarchy (tid, parent) VALUES (10, 0) in /mysite.com/html/includes/database.mysql.inc on line 172.
My resulting Vocab structure would look like this:
Things
-Basketball
-Round
--Basketball
-Orange
--Basketball
Instead of the expected:
Things
-Round
--Basketball
-Orange
--Basketball
It would appear that this is happening because the form_alter that triggers the betterselect_taxonomy_from_checkboxes is only happening on the node-form.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | betterselect_term_parent.patch | 568 bytes | q0rban |
Comments
Comment #1
q0rban commentedI don't know, maybe that's not the problem, bc I got the betterselect_taxonomy_from_checkboxes thing up and going for the taxonomy-form-term, and it still was giving me the same errors, so it must be a different structure for that form or something.
Is there a way in hook_elements to only call the betterselect_process for multi-select elements on the node form?
Comment #2
q0rban commentedWell, I wouldn't recommend this as a permanent solution, but just in case anyone _needs_ to fix this (like I do), here's an attached patch that will check to make sure we're not in admin/*/taxonomy/* when altering the multiselect form element. So any multiselect form element found in these paths will appear as a multiselect, not as checkboxes.
Comment #3
setvik commentedThanks so much for the patch and the follow-up on your issue!
When I have some free time, I'll take a look at incorporating it into the next release.
Thanks again!
Comment #4
setvik commentedComment #5
lillywolf commentedThis issue was preventing nodes from appearing on my forum pages. Thanks to the patch, it's fixed.
Comment #6
john franklin commentedDrupal 5 is no longer supported. If this is still an issue in 6.x or 7.x, please open a new issue.