-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.7.0 beta migration #1250
Comments
Hi How many times did you tried to run the upgrade process ? Also did you used Formcreator older than 2.5.x on this instance of GLPI ? If you have a backup of your DB before any attempt to upgrade to 2.7.0, please search in this snapshot, table glpi_displaypreferences. Do you have some rows where itemtype='PluginFormcreatorFormAnswer' |
No this installation should be 2.6.3 but we had upgrade trouble in past see issue 9 9 7. MariaDB [glpidb]> select * from glpi_displaypreferences where itemtype='PluginFormcreatorFormAnswer'; MariaDB [glpidb]> select * from glpi_displaypreferences where itemtype='PluginFormcreatorForm_Answer'; |
btw message from browser Done (8 seconds) Done (8 seconds) Change of the database layout - glpi_plugin_formcreator_answers (8 seconds) Table 'glpidb.glpi_plugin_formcreator_questionregexes' doesn't exist Please, check migration log |
root@glpidev:/var/www/glpi/files/_log# cat migration_to_2.7.0-beta.1.log |
Hi In the past the itemtype PluginFormcreatorFormAnswer was renamed into PluginFormceatorForm_Answer. An issue was found in the choice of the parent class of this itemtype. The fix required for semantic reasons that the itemtype is renamed back to PluginFormcreatorFormAnswer. I think that the upgrdade code in the first rename was incomplete and did not update the display preferences. But in the version 2.7.0 the display preferences are updated and conflict with old data which should not exists. I'll prepare a patch soon for this issue. If you have skills, the patch should delete the old display prefs before updating the new ones. If you don't have skills, please be patient I'll prepare a patch for you. For your 2nd post, I already provided a fix. But no feedback from requester. You may try the branch develop |
So i go back to the past. Upgraded 9.3.0 to 9.3.3 and foms from <2.6.4 (or < 2.5.0) to 2.7.0 beta |
Hi Show the php / sql errors in the logs to identify the issues. and tell exactly which was the "start" version of Formcreator used for this uptgrade attempt. Also, if you used the latest revision of the plugin for the upgrade (after the tag 2.7.0-beta.1) please let me know. |
glpi 9.1.2 root@glpidev:/var/www/glpi/files/_log# cat sql-errors.log |
Hi I checked your old issue #997 : it sould not be related to this one. I also checked the problem with the columns Finally, before the migration you can delete the old data in display prefs found with Waiting for feedback. |
Nothing change. 2.5.0 and 2.7.0 same table structure MariaDB [glpidb]> show create table glpi_pluginformcreator_form_answers; MariaDB [glpidb]> |
MariaDB [glpidb]> show create table glpi_pluginformcreator_form_answers; |
2.5.0 MariaDB [glpidb]> select * from glpi_configs where context='formcreator'; MariaDB [glpidb]> show create table glpi_pluginformcreator_form_answers; i can see my forms upgrade 2.7.... beta from developer branch |
Hi In the source code of version 2.5.0 I see : Notice that the name of the table is If in the version 2.5.0 you have a table named In 2.6.0, the same table v2.5.0CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms_answers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`entities_id` int(11) NOT NULL DEFAULT '0',
`is_recursive` tinyint(1) NOT NULL DEFAULT '0',
`plugin_formcreator_forms_id` int(11) NOT NULL,
`requester_id` int(11) DEFAULT NULL,
`validator_id` int(11) DEFAULT NULL,
`request_date` datetime NOT NULL,
`status` enum('waiting','refused','accepted') NOT NULL DEFAULT 'waiting',
`comment` text,
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
INDEX `plugin_formcreator_forms_id` (`plugin_formcreator_forms_id`),
INDEX `entities_id_is_recursive` (`entities_id`, `is_recursive`),
INDEX `requester_id` (`requester_id`),
INDEX `validator_id` (`validator_id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; v2.6.0CREATE TABLE IF NOT EXISTS `glpi_plugin_formcreator_forms_answers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`entities_id` int(11) NOT NULL DEFAULT '0',
`is_recursive` tinyint(1) NOT NULL DEFAULT '0',
`plugin_formcreator_forms_id` int(11) NOT NULL,
`requester_id` int(11) DEFAULT NULL,
`users_id_validator` int(11) DEFAULT NULL,
`groups_id_validator` int(11) DEFAULT NULL,
`request_date` datetime NOT NULL,
`status` enum('waiting','refused','accepted') NOT NULL DEFAULT 'waiting',
`comment` text,
`is_deleted` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
INDEX `plugin_formcreator_forms_id` (`plugin_formcreator_forms_id`),
INDEX `entities_id_is_recursive` (`entities_id`, `is_recursive`),
INDEX `requester_id` (`requester_id`),
INDEX `users_id_validator` (`users_id_validator`),
INDEX `groups_id_validator` (`groups_id_validator`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; Notice the table has the same name, but the column Visibility of forms
Please share a screenshot. I need to identify where the bug happens. |
Bonjour, Pourriez vous me fournir le code de creation de la table ? GLPI 9.3.2 innoDB |
Hi @Sicoval31 Please try the develop branch. The upgrade issues found in the beta should be fixed. |
Merci, c'est OK avec la version develop :) |
i hope i can test it on 09-01-2019 |
the patch don't work for me. |
root@glpidev:/var/www/glpi/files/_log# cat sql-errors.log |
ok. i read again and test again. Back to my snapshot 9.3.3 - 2.5.0 i saw the wrong table. i dropped glpi_plugin_formcreator_formanswers in 2.5.0 and installed latest develop branch from to today. know i see my forms and all is fine. we can close the case thanks |
Great, thank you for your feedback. |
root@glpidev:/var/www/glpi/files/_log# cat sql-errors.log
[2018-12-19 23:38:35] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/inc/dbmysql.class.php line 177
*** MySQL query error:
SQL: UPDATE
glpi_displaypreferences
SETitemtype
= 'PluginFormcreatorFormAnswer' WHEREitemtype
= 'PluginFormcreatorForm_Answer'Error: Duplicate entry '0-PluginFormcreatorFormAnswer-2' for key 'unicity'
Backtrace :
inc/dbmysql.class.php:1029
plugins/formcreator/install/upgrade_to_2.7.php:45 DBmysql->update()
plugins/formcreator/install/install.php:135 PluginFormcreatorUpgradeTo2_7->upgrade()
plugins/formcreator/install/install.php:103 PluginFormcreatorInstall->upgradeOneStep()
plugins/formcreator/hook.php:50 PluginFormcreatorInstall->upgrade()
inc/plugin.class.php:707 plugin_formcreator_install()
front/plugin.form.php:47 Plugin->install()
{"user":"6@glpidev"}
root@glpidev:/var/www/glpi/files/_log# cat migration_to_2.7.0-beta.1.log
2018-12-19 23:36:50 [6@glpidev]
0 Sekunden for "Upgrade to schema version 2.5" @ 2018-12-19 23:38:09 [6@glpidev]
1 Minuten 19 Sekunden for "Upgrade glpi_plugin_formcreator_answers" @ 2018-12-19 23:38:09 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_answers" @ 2018-12-19 23:38:09 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_categories" @ 2018-12-19 23:38:10 [6@glpidev]
1 Sekunde for "Upgrade glpi_plugin_formcreator_forms_answers" @ 2018-12-19 23:38:11 [6@glpidev]
1 Sekunde for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_forms_answers" @ 2018-12-19 23:38:11 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_forms_profiles" @ 2018-12-19 23:38:11 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_forms_validators" @ 2018-12-19 23:38:11 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_forms" @ 2018-12-19 23:38:11 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_forms" @ 2018-12-19 23:38:11 [6@glpidev]
0 Sekunden for "Drop glpi_plugin_formcreator_headers" @ 2018-12-19 23:38:12 [6@glpidev]
1 Sekunde for "Upgrade glpi_plugin_formcreator_issues" @ 2018-12-19 23:38:17 [6@glpidev]
5 Sekunden for "Upgrade glpi_plugin_formcreator_questions_conditions" @ 2018-12-19 23:38:17 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_questions_conditions" @ 2018-12-19 23:38:22 [6@glpidev]
5 Sekunden for "Upgrade glpi_plugin_formcreator_questions" @ 2018-12-19 23:38:23 [6@glpidev]
1 Sekunde for "Upgrade glpi_plugin_formcreator_sections" @ 2018-12-19 23:38:23 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_targets" @ 2018-12-19 23:38:23 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_targetchanges" @ 2018-12-19 23:38:23 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_targetchanges_actors" @ 2018-12-19 23:38:23 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_targettickets_actors" @ 2018-12-19 23:38:24 [6@glpidev]
1 Sekunde for "Upgrade glpi_plugin_formcreator_targettickets" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Drop glpi_plugin_formcreator_titles" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_questions_conditions" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_questions" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_sections" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_targets" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_targettickets" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Done" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Upgrade to schema version 2.6" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_forms_answers" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_questions" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Upgrade glpi_plugin_formcreator_forms_answers" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_forms_answers" @ 2018-12-19 23:38:24 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_targettickets" @ 2018-12-19 23:38:25 [6@glpidev]
1 Sekunde for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_forms_answers" @ 2018-12-19 23:38:25 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_answers" @ 2018-12-19 23:38:25 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:25 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:25 [6@glpidev]
0 Sekunden for "Done" @ 2018-12-19 23:38:34 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:34 [6@glpidev]
0 Sekunden for "Done" @ 2018-12-19 23:38:35 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:35 [6@glpidev]
0 Sekunden for "Done" @ 2018-12-19 23:38:50 [6@glpidev]
15 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_answers" @ 2018-12-19 23:38:50 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_answers" @ 2018-12-19 23:38:50 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_targetchanges" @ 2018-12-19 23:38:51 [6@glpidev]
1 Sekunde for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_questions" @ 2018-12-19 23:38:51 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_targettickets" @ 2018-12-19 23:38:51 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_forms" @ 2018-12-19 23:38:52 [6@glpidev]
1 Sekunde for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_sections" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "Änderung des Datenbank-Layouts - glpi_plugin_formcreator_issues" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "Done" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "Bearbeitung abgeschlossen" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "create database schema" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "Configure existing entities" @ 2018-12-19 23:38:52 [6@glpidev]
0 Sekunden for "create request type" @ root@glpidev:/var/www/glpi/files/_log#
root@glpidev:/var/www/glpi/files/_log#
The text was updated successfully, but these errors were encountered: