Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2008 at 18:49 UTC
Updated:
13 Oct 2009 at 13:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
grndlvl commentedComment #2
grndlvl commentedOops sorry wrong patch
Comment #3
drummNew features must be added only to the current development version. Since this is a small API addition, there is a small chance it might be added to stable versions.
Comment #4
catchCore normally uses $reset in these situations, so re-rolled with that.
Comment #5
catch#306891: taxonomy_get_tree has a static but no way to reset it was duplicate.
Comment #6
catchHere's a slight refinement which only flushes the static for $vid as opposed to all of them, which is important for this nastily expensive function.
I added some basic testing of taxonomy_get_tree into taxonomy.test in amongst the other hierarchy tests. However, I was unable to make it break without the reset - so any ideas on how to reproduce the errors in 306891 would be great.
Comment #7
catchSome test fixes via Damz in irc, still fails to fail though.
Comment #8
wim leersSubscribing.
Comment #9
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #10
jonathan_hunt commentedFYI, I just utilised the patch at #7 in 5.14; I'm importing multiple terms during a single page invocation and got caught by the static caching within taxonomy_get_tree(). Thanks for your work.
Comment #11
catchHad to add this reset in #144969: taxonomy_term_count_nodes returns wrong count (+ tests) which comes with tests.
Comment #12
catchDuplicate of that issue now.