Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Apr 2010 at 17:31 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andypostWhen term is edit default parent is not set
Simple fix
Comment #2
andypostNow with test
Comment #3
yched commentedBumped into that as well. Raising to critical.
I'll let catch or bangpound review the fix, though.
Comment #4
catchI really dislike that we use taxonomy_get_tree() in taxonomy_overview_terms() but that's not for this issue to fix. Patch itself looks good.
Comment #5
dries commentedCommitted to CVS HEAD. Thanks.
Comment #6
andypostAbout #4 I file new issue #763380: Do not use \Drupal\taxonomy\TermStorageInterface::loadTree() in \Drupal\taxonomy\Form\OverviewTerms::buildForm()
Comment #7
mikeryanHold on a sec... taxonomy_get_tree() does an inner join to taxonomy_term_hierarchy, so it appears that every term is expected to have a row in taxonomy_term_hierarchy, correct? So, shouldn't taxonomy_term_save enforce this? I'll see if I can throw together a patch...
Comment #8
andypost@mikeryan and already commited patch makes adding this row for every term
Comment #9
mikeryanIf you mean the patch you submitted in comment #2, that only fixes it for terms created through the UI - my point is that programmatic creation does not benefit from this patch, it needs to be in taxonomy_term_save().
Comment #10
andypost@mikeryan if you saving terms from custom module you should care about setting $term->parent because only developer knows about own data format.