pluginsGLPI / customfields

customfields plugin for GLPI
GNU General Public License v2.0
13 stars 4 forks source link

error when activating CF on Entity #49

Closed dethegeek closed 9 years ago

dethegeek commented 9 years ago

v 1.7 with GLPI 0.85

An sql error occurs when activating Entity From the source code, I understand that it tries to add a record for root entity (id 0) in table glpi_plugin_CF_entities. But from GLPI 0.84 on, the root entity has its own record, which was not the case before.

SQL: INSERT INTO glpi_plugin_customfields_entities (id) VALUES (\'0\') Error: Duplicate entry '0' for key 'PRIMARY' Backtrace : plugins/customfields/inc/function.php:515
plugins/customfields/front/manage.php:92 plugin_customfields_activate_all()

( redmine : https://forge.glpi-project.org/issues/5399 )