InfotelGLPI/mydashboard

Install Error

Closed this issue · 10 comments

[Initial]

[Steps to reproduce]

  • copy files to plugins folder
  • chmod 777 -R folder-name-of -plugin
  • click button install from plugin intreface in GLPI

[Screenshot]
image

image

tsmr commented

Hello.

This is a fresh install of the plugin or an update ?

This is a fresh install

tsmr commented

Into mydashboard\install\sql\empty-1.6.0.sql

Can you try to delete line :

FOREIGN KEY (users_id) REFERENCES glpi_users (id)

into

CREATE TABLE `glpi_plugin_mydashboard_userwidgets` (
  `id`         INT(11) NOT NULL AUTO_INCREMENT, -- id
  `users_id`   INT(11) NOT NULL
  COMMENT 'RELATION to glpi_users(id)',
  `widgets_id` INT(11) NOT NULL, -- id du widget
  `place`      INT(11) NOT NULL, -- placement du widget
  PRIMARY KEY (`id`),
  FOREIGN KEY (`users_id`) REFERENCES glpi_users (id)
)
  ENGINE = InnoDB
  DEFAULT CHARSET = utf8
  COLLATE = utf8_unicode_ci;

And try to install ?

tsmr commented

In fact your glpi_users table is not in InnoDB & the glpi_plugin_mydashboard_userwidgets is in InnoDB

I will try to switch to innodb and test again

my database engine was not innodb
When i switch to innodb engine problem was solved
Status can be changed to solved and closed 👍

if13 commented

Hi, dear friends!
Got the same error during the installation of the plugin.
"1.0.4 multiple alter in glpi_plugin_mydashboard_userwidgets - Ошибка во время запроса базы данных: ALTER TABLE glpi_plugin_mydashboard_userwidgets ADD interface TINYINT(1) NOT NULL DEFAULT '0' - Ошибка - Table 'glpi.glpi_plugin_mydashboard_userwidgets' doesn't exist "

As I understand it, the engine is correct.
image

What else could be the problem?

Hi,

Can you check the engin of each glpi_ tables ?
You can use the script innodb_migration available in /glpi/scripts/ to migrate all tables.

if13 commented

In 9.4 migration to innodb can be used via /bin/console. Not via script. And i migrate it. Can u tell me about cheking engine each glpi tables? How i can do it?

Bonjour,

Vous pouvez voir l'ensemble des tables avec leur engine via cette commande mysql :
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES where TABLE_SCHEMA = 'databaseName';