There are some glitches when trying to assign a theme to nodes with multiple terms and these terms happen to have subterms (children).

Consider this use case:

animals
- dogs
- cats
plants
- cacti
- grass

The term 'animals' and all its child terms are assigned to the same theme (lets call it animal_theme) and the term 'plants' and all its child terms are assigned to another theme (lets call it plant_theme). There is a different theme used throughout the site (lets call it default_theme) for when no specific theme is to be used.

Users are allowed to select terms from any level but no new terms are allowed to be created. So if a node is about chicken, it is tagged only with the generic tag 'animals'. If it is about dogs, it is tagged with both 'animals' & 'dogs' terms.

1. A node is created about cows and generically tagged as 'animals' -> animal_theme assigned [ok - no glitch here]

2. A node is created about cats and tagged with 'animals' & 'cats' -> no theme assigned correctly, so default_theme used [glitch]

3. A node is created about dogs and is intentionally tagged only as 'animals', saved, then re-edited and this time 'dogs' is also added as a tag -> animal_theme assigned, but only because there was an intermediate step taken. [glitch]

4. A node is created about a flower, but by mistake is assigned to 'animals' -> animal_theme assigned. Later on, the mistake is realized and the node is edited to be tagged with the correct tag 'plants'. The theme doesn't change and still is assigned to the animal_theme instead of the plant_theme. [glitch]

This is a fairly easy example to reproduce, just create a vocabulary with 5-6 terms as shown in my example and assign them to a different theme (use one of the core themes).

Comments

mkalkbrenner’s picture

Seems like a lot of effort to fix or even implement support for hierarchical vocabularies. Maybe should simply turn off the feature on these vocabularies ...