Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
27 Sep 2008 at 09:00 UTC
Updated:
14 Jul 2012 at 23:27 UTC
Jump to comment: Most recent file
Comments
Comment #1
webchickSubscriiiiiibe.
Also labeling DX.
Comment #2
catchHere's a patch.
I'm doing a cast to object in case taxonomy_term_save() is passed an array. I'd like to get rid of this, but this means rewriting 90% of the existing taxonomy term tests (same for vocabulary which needs the same treatment). I can do that here, but ideally it belongs in a different issue. Also drupal_write_record() casts to array internally as well, so I dunno if we might want to leave it as a helper along those lines.
Comment #3
catchFollowing pwolanin's improvements to #329140: Make vocabulary load/insert/update/save like terms, here's the same for taxonomy terms. taxonomy_term_save() can no longer be used to delete a term - apparently this wasn't used anywhere in core, but still...
Comment #4
dries commentedAlso committed this patch. Please update the docs! :)
Comment #5
catchI missed a couple of cast to objects, and one typo made it through. Found this when saving new terms from the node form - so we need a test for that, and taxonomy.test is a real mess in general.
Comment #6
dries commentedLet's add a test! We should set the right example. Thanks catch. :)
Comment #7
catchHere it is with a test :)
Comment #8
catchadded code comments and whitespace changes.
Comment #9
catchand fixed a typo that appears to have become unfixed in one of the revisions.
Comment #10
webchickCommitted, thanks!
Comment #11
catchBack to needs work for docs.
Also byproduct of dbtng conversion was this bug (also not tested, but now it is) #332145: UNSTABLE-3 blocker: taxonomy_form_term_submit passes empty string as parent [dbtng conversion regression].
Comment #12
catchAdded documentation http://drupal.org/node/224333#term_functions
Comment #14
salvisThe committed patch in #3 has an undesired side effect. I've opened a new issue: #850690: Regression: Set the tid of the newly created forum or container