If a user selects a child term but doesn't tick the parent, this option will automatically save both the parent and child terms. This happens in the submit handler. There is an admin option added to turn this on and off. See patch, which includes the changes from my other two issues.

#376968: Give each better-select div a unique id
#376710: Use Drupal.behaviors in .js

Comments

Mark Theunissen’s picture

StatusFileSize
new3.44 KB

I haven't added the few lines to the function betterselect_taxonomy_form_term_from_checkboxes(), could the developers of this module help please? What does this function do? I can't seem to find the taxonomy_form_term.

Mark Theunissen’s picture

StatusFileSize
new3.61 KB

Woops, last patch was broken.

Mark Theunissen’s picture

Status: Needs review » Fixed

Fixed in -dev. I also split the settings form into Taxonomy and General settings.

Status: Fixed » Closed (fixed)

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

bartezz’s picture

Status: Closed (fixed) » Active

Hi Mark,

I've tested this a bit and found out it doesn't really save lineage. It only saves the parent of a selected term. Now if the parent is also a child (in case of a 3 level hierarchy) the parent's gradnparent isn't saved into the lineage.

- level 1
-- level 2
--- level 3

If you check level 3 then level 2 will be saved, but not level 1.

Is there a setting for this? Or should this be a new feature request?

Cheers,
Bart

bartezz’s picture

Status: Active » Needs review
StatusFileSize
new655 bytes

Attached an easy fix for this using taxonomy_get_parents_all() instead of taxonomy_get_parents()...

Cheers

bartezz’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-beta2

Sorry forgot to change to correct version.

ipwa’s picture

Status: Needs review » Reviewed & tested by the community

Thanks Bartezz, will commit this patch

john franklin’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks for the patches, Mark Theunissen and Bartezz.

Status: Fixed » Closed (fixed)

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