If you want to move a term between vocabularies, which I often do, you either have to update it directly in the database or download http://drupal.org/project/taxonomy_switch - which doesn't have a D6 version and has a very strange interface. It's possible taxonomy manager does this, but last time I tried it didn't.
$vid is already in the term edit form, so all we need to do is make it into a select instead of #value.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | vocabulary.patch | 2.89 KB | catch |
| #4 | vocabulary.patch | 3.72 KB | catch |
| #3 | vocabulary.png | 24.18 KB | pp |
| #2 | vocabulary.patch | 2.95 KB | catch |
| #1 | vocabulary.png | 10.04 KB | catch |
Comments
Comment #1
catchGrr, I'd removed the useless description from the patch before posting, but not from the screenshot.
Comment #2
catchAdded a test.
Comment #3
pp commentedFirst problem:
You always set $vocabulary the last one in the $vocabularyes. Use different variable name in the foreach!
Second:
What about the other selects(Related terms, Parents) int the Advenced options?
I created another vocabulary. Its name is Tags2. Created two tags (tags2_term1, tags2_term2) and edited tags2_term2. I think If I set tags2_term1 for parent and Tags for vocabulary the database will be inconsistent.
pp
Comment #4
catchCross-posted - I'd fixed the variable naming already.
Related terms and parents, hmm, yes that's an issue. There's nothing in the schema to stop you from setting these across vocabularies (I can see use cases for this for related terms, not for parents though), but core doesn't support it.
Added validation to prevent moving a term between vocabularies if it has parents, children or related terms.
Comment #6
xanoBrain fart: what about related terms in different vocabularies?
Comment #7
catchStraight re-roll for the bot.
Comment #8
Anonymous (not verified) commentedThis is an edge case with only hacky contrib solutions that only developers should use and only with fair warning. When vocabularies can have different fields, it's not reasonable to do this in core. Too much would easily break.
We can only treat this as "normal" as changing a node from one type to another would be.
See http://drupal.org/project/nodetype