I added a few lines that fixes it. It would not run more than a few times on an average page so I don't think it's too expensive.

-----

EDITED: scrap this patch, i'll upload a much simpler one. for now:

around line 381:

           // Store the additional information. One term can occur in multiple
           // lineages: when Taxonomy's "multiple parents" functionality is
           // being used.
           $items[$id][$key]['hs_lineages'][] = array(
+            'tid'     => $tid,
             'lineage' => $lineage,
             'level'   => $level,

around line 407:

     for ($i = 0; $i < count($metadata); $i++) {
       $term = new StdClass();
+      $term->tid = $metadata[$i]['tid'];
       $term->vid = $vocabulary->vid;
       $term->vocabulary_machine_name = $vocabulary->machine_name;
       $term->name = $metadata[$i]['label'];

Comments

dakhota’s picture

Assigned: dakhota » Unassigned
dakhota’s picture

Issue summary: View changes

the correct solution

geek-merlin’s picture

Version: 7.x-3.0-alpha5 » 7.x-3.x-dev
Category: feature » bug
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.17 KB

how funny. i just implemented it exactly the same way as outlined in the summary.
works like a charm here and at @dakhote so rtbc.

here's the patch against durrent dev.

daring to reschedule as bug as imho this is expected behavior.

summit’s picture

Hi,
Yes this works great! Would love to see this committed!
Greetings, Martijn

romansta’s picture

Works!

wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Had to reroll this now that #1331812: Notice: Trying to get property of non-object in hs_taxonomy_hierarchical_select_valid_item() has finally gone in. Thanks for the patch — committed!

I credited dakhota because then it's his first commit, while axel.rutz already has plenty :)

http://drupalcode.org/project/hierarchical_select.git/commit/1da92c0

geek-merlin’s picture

good thing this is committed.
crediting dakhota is fine with me!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

eh...