1. create taxonomy vocabulary, add at least one term there
2. create taxonomy term named 0 (just number zero). it works.
3. change the weight of this term and save form on admin/content/taxonomy/[vid] (using AHAH drag&drop) => term named 0 not there any more.

Comments

eiland’s picture

Version: 6.17 » 6.19

I confirm this bug.

eiland’s picture

An obvious workaround is to

UPDATE `db`.`term_data` SET `name` = '0' WHERE `term_data`.`tid` = [tid];

but im not sure if that will be very resilient if you for example change the order of terms, and the deleting mechanism comes in force.

Dont forget to update the url alias too.

kmajzlik’s picture

Changing order of terms deletes term named '0' too. User can't do anything at DB!

eiland’s picture

Priority: Normal » Major

random exstinguishing a term seems like a big bug to me > upscaling.

joachim’s picture

This works ok on D7 -- this is a D6 only bug, which is one thing at least :)

bdsl’s picture

Status: Active » Needs work
joachim’s picture

Status: Needs work » Active

Please review the meaning of the Status values -- 'needs work' means there is a patch, and there isn't.

bdsl’s picture

Thanks, have reviewed the meaning of the status values, I see that I got it wrong there. I thought 'needs work' meant it had been confirmed that there is something that could do with being fixed in the project.

valthebald’s picture

Version: 6.19 » 6.x-dev
dibyendu4all’s picture

Yes the same problem i have also faced.
I have changed the code for taxonomy.module file:

Under
function taxonomy_save_term(&$form_values) {
please find the line: if (!empty($form_values['tid']) && $form_values['name']) {

changed the code from
if (!empty($form_values['tid']) && $form_values['name']) {
to
if (!empty($form_values['tid']) && isset($form_values['name'])) {

The above solution solved my problem.

lyricnz’s picture

There are several bugs in Drupal where it assumes that empty() returns TRUE only for null or '' (empty string). However several other things also return TRUE - see http://php.net/empty

"" (an empty string)
0 (0 as an integer)
0.0 (0 as a float)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
$var; (a variable declared, but without a value)

I believe I did an audit of the code for this several years ago, in a d.o issue, but it hasn't progressed since then.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.