Hi everyone,
I am sandbox upgrading a copy of my live prestashop website in MAMP (free) following the iteration:
- my website is a 1.6.1.3
- I perform an update of the stated 1.6.1.3 to a 1.6.1.24 with 1-click update and everything goes smooth, than I change MAMP from php 5.6.40 to 7.1.33 while uninstalling and deleting (in this order) all non native modules and themes except revws and payplug
- I fresh install, in a different htdocs directory and in a different database, a 1.6.1.24 and I copy inside modules revws and payplug, the img folder and the setting file
- I delete the 1.6.1.3 updated to 1.6.1.24 directory and the fresh install 1.6.1.24 database and connect the 1.6.1.24 fresh install to the 1.6.1.3 updated to 1.6.1.24 database and I modify the fresh install 1.6.1.24 directory to match the updated one that has been deleted
- So I have a fresh install of prestashop connected to my previous historical complete database
- In all of this process I kept non native module and overrides deactivated and performed multiple database checkout with module prestashop cleaner 1.8 and reverted to official theme, so a very "vanilla" situation.
At this point, I tested all the functions of local website I find myself with and everything seems to go fine, no errors while using debug mode, so I feel comfortable in using 1-click module to update to PS 1.7.7.4.
- I put the zip in the download folder and proceed with the update. Everything goes smooth in the files update (all green), but when the process goes to the database, I find myself with an error and a barely accessible back office, with front-office, and back office orders, customers and setting unaccessible due to too many redirects.
Here you are the database update situation and errors:
Updating database schema...
Executing: CREATE TABLE ps_translation (id_translation INT AUTO_INCREMENT NOT NULL, id_lang INT NOT NULL, `key` TEXT NOT NULL COLLATE utf8_bin, translation TEXT NOT NULL, domain VARCHAR(80) NOT NULL, theme VARCHAR(32) DEFAULT NULL, INDEX IDX_ADEBEB36BA299860 (id_lang), INDEX `key` (domain), PRIMARY KEY(id_translation)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
Executing: CREATE TABLE ps_module_history (id INT AUTO_INCREMENT NOT NULL, id_employee INT NOT NULL, id_module INT NOT NULL, date_add DATETIME NOT NULL, date_upd DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
Executing: CREATE TABLE ps_admin_filter (id INT AUTO_INCREMENT NOT NULL, employee INT NOT NULL, shop INT NOT NULL, controller VARCHAR(60) NOT NULL, action VARCHAR(100) NOT NULL, filter LONGTEXT NOT NULL, filter_id VARCHAR(191) NOT NULL, UNIQUE INDEX admin_filter_search_id_idx (employee, shop, controller, action, filter_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
Executing: DROP INDEX lang_iso_code ON ps_lang
Executing: ALTER TABLE ps_lang CHANGE active active TINYINT(1) NOT NULL DEFAULT '0' , CHANGE iso_code iso_code VARCHAR(2) NOT NULL, CHANGE language_code language_code VARCHAR(5) NOT NULL, CHANGE date_format_lite date_format_lite VARCHAR(32) NOT NULL DEFAULT 'Y-m-d' , CHANGE date_format_full date_format_full VARCHAR(32) NOT NULL DEFAULT 'Y-m-d H:i:s' , CHANGE is_rtl is_rtl TINYINT(1) NOT NULL DEFAULT '0'
Executing: CREATE INDEX IDX_2F43BFC7BA299860 ON ps_lang_shop (id_lang)
Executing: ALTER TABLE ps_lang_shop RENAME INDEX id_shop TO IDX_2F43BFC7274A50A0
Executing: DROP INDEX id_lang ON ps_attribute_lang
Executing: CREATE INDEX IDX_3ABE46A77A4F53DC ON ps_attribute_lang (id_attribute)
Executing: CREATE INDEX IDX_3ABE46A7BA299860 ON ps_attribute_lang (id_lang)
Executing: DROP INDEX deleted ON ps_shop_group
Executing: ALTER TABLE ps_shop_group CHANGE active active TINYINT(1) NOT NULL DEFAULT '1' , CHANGE deleted deleted TINYINT(1) NOT NULL DEFAULT '0'
Executing: DROP INDEX id_parent ON ps_tab
Executing: DROP INDEX class_name ON ps_tab
Executing: ALTER TABLE ps_tab ADD route_name VARCHAR(256) DEFAULT NULL, CHANGE position position INT NOT NULL, CHANGE active active TINYINT(1) NOT NULL DEFAULT '1' , CHANGE hide_host_mode hide_host_mode TINYINT(1) NOT NULL DEFAULT '0' , CHANGE icon icon VARCHAR(32) DEFAULT ''
Executing: DROP INDEX id_shop_group ON ps_shop
Executing: DROP INDEX id_category ON ps_shop
Executing: ALTER TABLE ps_shop CHANGE id_category id_category INT NOT NULL DEFAULT '1' , CHANGE theme_name theme_name VARCHAR(255) NOT NULL, CHANGE active active TINYINT(1) NOT NULL DEFAULT '1' , CHANGE deleted deleted TINYINT(1) NOT NULL DEFAULT '0'
Executing: CREATE INDEX IDX_CBDFBB9EF5C9E40 ON ps_shop (id_shop_group)
Executing: ALTER TABLE ps_attribute CHANGE color color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT '0'
01:24:42 ERROR [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while executing 'ALTER TABLE ps_attribute CHANGE color color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT '0' ':
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 20" ["exception" => Doctrine\DBAL\Exception\DriverException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while executing 'ALTER TABLE ps_attribute CHANGE color color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT '0' ':\n \n SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 20 """]
In AbstractMySQLDriver.php line 106:
An exception occurred while executing 'ALTER TABLE ps_attribute CHANGE colo
r color VARCHAR(32) NOT NULL, CHANGE position position INT NOT NULL DEFAULT
'0' ':
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 20
In PDOConnection.php line 90:
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 20
In PDOConnection.php line 88:
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'color' at row 20
prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]
Do you have any solution to suggest?
How do I address which tables are provoking the issue in order to correct them before proceeding with the 1.7.7.4 update?
Thanks a lot for any suggestion provided.
The following are the specifications of MAMP at the time of the error:
PHP: 7.1.33
max_execution_time30000
max_file_uploads20
max_input_nesting_level64
max_input_time60000
max_input_vars10000
memory_limit1024M
post_max_size256M
Web server: Apache
[SOLVED] After posting the problem also on stackoverflow I was made to notice that the error message clearly referred to a field regulated in the database by a VARCHAR of up to 32 characters including spaces which appeared to be populated in excess. Found the field, reduced the content from 35 to 29 characters and this error was resolved, allowing me to reach completion of the update.
In any case, given the excess of errors from previous installation (database and prestashop are carried out, without reset, since 2013), I connected the database updated to 1.7 to a fresh install 1.7. I currently have permissions problems on this new database, but this specific issue has been fixed.