Bug #5271

Error at install

Added by blerohellec over 4 years ago. Updated over 4 years ago.

Status:NewStart date:04/10/2015
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

At the very first installation of the plugin (no previous version present), the install step generates an error : "duplicate column name 'entities_id'". And nothing more is displayed on screen.

Tables glpi_plugin_moreldap* are created.

GlPI must be relaunched.
But The plugin is still not yet considered as installed.

press button 'Install' another time. It goes until the end of the process without error. Plugin is now installed/not activated.
Active -> OK.

Analysis : column entities_id is in table _authldaps.
Table is created by install/install.php
But in hook.php, function plugin_moreldap_install adds also column entities_id to table _authldaps, in principle when it comes from an older version.

History

#1 Updated by blerohellec over 4 years ago

see sql-errors.log. Extract hereafter.

  • MySQL query error: ***
    SQL: ALTER TABLE `glpi_plugin_moreldap_authldaps`
    ADD COLUMN `entities_id` INT NOT NULL default \'0\',
    ADD COLUMN `is_recursive` INT NOT NULL DEFAULT \'0\'
    Error: Duplicate column name 'entities_id'
    Backtrace :
    /var/www/glpi084/plugins/moreldap/hook.php :51 DBmysql->query()
    /var/www/glpi084/inc/plugin.class.php :615 plugin_moreldap_install()
    /var/www/glpi084/front/plugin.form.php :45 Plugin->install()
    /var/www/glpi084/front/plugin.form.php

Also available in: Atom PDF