i18n_taxonomy incorrectly sets terms when updating a vocabulary of mode I18N_TAXONOMY_LOCALIZE

andrewlevine - September 14, 2009 - 15:37
Project:Internationalization
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:fixed
Description

Ran into a bug where, by accident, I set the language of a vocabulary even though it was using the I18N_TAXONOMY_LOCALIZE mode. On vocabulary creation this isn't a problem and I went ahead and added my terms and everything was fine. Later when I updated the vocabulary to add it to a new content type, all of the vocabulary's terms were incorrectly set to the language I had set the vocabulary to on creation.

This behavior doesn't make sense for any mode besides I18N_TAXONOMY_LANGUAGE and the included patch stops this from happening.

AttachmentSize
i18n_dontsetlang.patch1.68 KB

#1

Jose Reyero - November 5, 2009 - 18:17
Status:needs review» needs work

Agree, that's just because I'm a lazy guy and the form doesn't have prover validation.

I you want to implement the form validation, and/or add some js...

#2

andrewlevine - November 9, 2009 - 19:31
Status:needs work» needs review

Jose, attached is the patch using form validation and Javascript

AttachmentSize
i18n_dontsetlang2.patch 2.48 KB

#3

andrewlevine - November 9, 2009 - 19:33

Forgot to mention, this patch applies to 6.x-1.x-dev with a fuzz factor (I wrote it against a non-dev version), but I've tested it on dev and it works fine.

#4

Jose Reyero - November 24, 2009 - 16:29
Status:needs review» fixed

Great patch. Just added some more validation for the left case (no language selected).

Thank you!

 
 

Drupal is a registered trademark of Dries Buytaert.