Found an error when deploying GLPI plugin “Generic Objects Management” v 1.1.3 from

I could add and modify object types, but was unable to add objects. Clicking “Add” button did nothing.


Switched GLPI to debug mode and found “SELECT * FROM `glpi_plugin_genericobject_…` WHERE is_template = ‘1’ AND FK_entities=’0′ ORDER BY tplname 0.001 Unknown column ‘tplname’ in ‘order clause’ ” near the bottom.
Of course, the was no ‘tplname’ field in the DB.

A quick search in the sourse revealed:
the apropriate database is created when object’s type is created;
the function “plugin_genericobject_addTable($name)” resides in “inc/plugin_genericobject.objecttype.function.php”

$diff -u plugin_genericobject.objecttype.function.php.orig plugin_genericobject.objecttype.function.php

— plugin_genericobject.objecttype.function.php.orig 2009-12-21 00:01:19.000000000 +0200
+++ plugin_genericobject.objecttype.function.php 2009-12-21 00:06:34.000000000 +0200
@@ -251,6 +251,7 @@
`is_template` INT ( 1 ) NOT NULL DEFAULT 0,
`comments` TEXT NULL ,
`notes` TEXT NULL ,
+ `tplname` VARCHAR( 255 ) NULL ,
) ENGINE = MYISAM COMMENT = ‘$name table’;”;

‘tplname’ field should be altered in “plugin_genericobject_enableTemplateManagement” function, but for some reason it isn’t.
That’s all.