Deletion of terms fails in current HEAD (taxonomy.admin.inc,v 1.36 2008/11/09 00:58:03
) because taxonomy_term_confirm_delete_submit()
calls the non-existing function taxonomy_del_term()
(taxonomy.admin.inc line 840). This function was renamed with #314147: DX: Standardise taxonomy load/save/delete functions on objects to taxonnomy_term_delete()
.
Unfortunately I can't create patches with cvs diff from here, so here is one taken with diff -uP
from within directory modules/taxonomy.
Comment | File | Size | Author |
---|---|---|---|
#10 | taxonomy_delete.patch | 5.46 KB | catch |
#8 | taxonomy_term_delete.patch | 4.98 KB | swentel |
#3 | taxonomy_term_delete.patch | 3.22 KB | catch |
#1 | taxonomy_term_delete.patch | 1.15 KB | swentel |
taxonomy_term_delete.patch | 668 bytes | stBorchert | |
Comments
Comment #1
swentel CreditAttribution: swentel commentedCan confirm this, patch attached with diff from drupal root.
Comment #2
Dries CreditAttribution: Dries commentedLooks like there is more untested code ...
Comment #3
catchNow 50% less untested. The other 50% will need to go in forum.test, but not by me tonight at least.
Comment #4
swentel CreditAttribution: swentel commentedLot's of notices pop up when trying to write a test to delete a forum:
if you go to forum/notexistingtid, following pops up:
* Notice: Trying to get property of non-object in taxonomy_get_parents_all() (line 773 of /var/www/drupal/drupal-cvs/modules/taxonomy/taxonomy.module).
* Notice: Trying to get property of non-object in template_preprocess_forums() (line 717 of /var/www/drupal/drupal-cvs/modules/forum/forum.module).
* Notice: Trying to get property of non-object in template_preprocess_forums() (line 721 of /var/www/drupal/drupal-cvs/modules/forum/forum.module).
* Notice: Trying to get property of non-object in template_preprocess_forums() (line 721 of /var/www/drupal/drupal-cvs/modules/forum/forum.module).
Comment #5
swentel CreditAttribution: swentel commentedAlso notices on install / reinstall of forum - not sure if this should be fixed in this patch, but just mentioning it.
* Notice: Trying to get property of non-object in taxonomy_vocabulary_save() (line 209 of /var/www/drupal/drupal-cvs/modules/taxonomy/taxonomy.module).
* Warning: Attempt to assign property of non-object in taxonomy_vocabulary_save() (line 209 of /var/www/drupal/drupal-cvs/modules/taxonomy/taxonomy.module).
* Notice: Trying to get property of non-object in taxonomy_vocabulary_save() (line 218 of /var/www/drupal/drupal-cvs/modules/taxonomy/taxonomy.module).
* Notice: Trying to get property of non-object in taxonomy_vocabulary_save() (line 219 of /var/www/drupal/drupal-cvs/modules/taxonomy/taxonomy.module).
* Warning: Invalid argument supplied for foreach() in taxonomy_vocabulary_save() (line 219 of /var/www/drupal/drupal-cvs/modules/taxonomy/taxonomy.module).
Comment #6
catchI tracked down the bug in taxonomy_get_parents_all() and uploaded a patch over at #351669: taxonomy_get_parents_all() is not E_ALL compliant - since this affects both Drupal 6 and 7. Can't reproduce the install/uninstall notices though.
@swentel - can you try your test with the other patch applied?
Comment #7
swentel CreditAttribution: swentel commented@catch if I apply the patch from #217676: taxonomy_term_load_parents_all() doesn't work correctly with multiple hierarchy terms on the latest head, going to forum/# simply does nothing, apache cpu goes nuts on it ... looking into it why that happens on my setup, not sure if you can reproduce that behavior.
Comment #8
swentel CreditAttribution: swentel commentedPatch with removing forum test also included. Still marking CNW since #351669: taxonomy_get_parents_all() is not E_ALL compliant needs to get in first.
Comment #9
catchMarking postponed until the other patch gets in.
Comment #10
catchWell that didn't work. Here's a patch combining the two.
Comment #11
webchickThis exceeds the brain requirements for a quick fix. ;) I'll take a look tomorrow.
Comment #13
catchTest bot not happy.
Comment #14
webchickLooks good to me. :) Committed to HEAD. Thanks, guys!!