You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2015-04-08 10:22:46

blerohellec
Member
From: Paris
Registered: 2015-04-08
Posts: 84

non hierarchical dropdown translations

Hello,

I am running GLPI v0.85.2.

An error occurs when I add a translation (let's say Spanish) for Name of RequestTypes dropdown.
The error is to be seen in sql-errors.log and php-errors.log (extracts hereafter).

php-errors.log

*** PHP Notice(8): Undefined variable: foreignKey
  Backtrace :
  inc/dropdowntranslation.class.php:295             
  inc/dropdowntranslation.class.php:172
DropdownTranslation->generateCompletename()
  inc/commondbtm.class.php:823
DropdownTranslation->post_addItem()
  front/dropdowntranslation.form.php:39              CommonDBTM->add()

sql-errors.log

*** MySQL query error:
  SQL: SELECT `id`
             FROM `glpi_requesttypes`
             WHERE `` = \'-1\'
  Error: Unknown column '' in 'where clause'
  Backtrace :
  inc/dbmysql.class.php:778                         
  inc/dbmysql.class.php:532
DBmysqlIterator->__construct()
  inc/dropdowntranslation.class.php:297              DBmysql->request()
  inc/dropdowntranslation.class.php:172
DropdownTranslation->generateCompletename()
  inc/commondbtm.class.php:823
DropdownTranslation->post_addItem()
  front/dropdowntranslation.form.php:39              CommonDBTM->add()

It has no impact on the application itself : the translation process works properly, table glpi_dropdowntranslations seems correctly populated.

Slightly the same occurs when modifying or deleting a translation.
Same error if I a add a translation for Comments.

In fact, it seems that error occurs only for non-hierarchical dropdown, like Requesttypes.
It seems that GLPI try to add a CompleteName ... which is not applicable in case of non hierarchical dropdowns.

On the contrary, there is no error for hierarchical dropdowns, like ItilCategories.


Benoit Le Rohellec
blerohellec@tlsconsulting.eu
www.tlsconsulting.eu

Offline

#2 2015-04-09 16:12:01

MoYo
GLPI - Lead
From: Poitiers
Registered: 2004-09-13
Posts: 14,513
Website

Re: non hierarchical dropdown translations

Thanks I fix it.

regards


MoYo - Julien Dombre - Association INDEPNET
Contribute to GLPI :    Support     Contribute     References     Freshmeat

Offline

Board footer

Powered by FluxBB