Closed
Description
I got this error; Import failed: Unable to unserialize value, string is corrupted.
when running php bin/magento app:config:import
to import my app/etc/config.php
.
It turns out, the importer does a comparison in \Magento\Config\Model\Config\Importer::import
. To do this comparison, it retrieves a 'flag'; the system_config_snapshot
flag. This is saved in the database. The problem is; the flag_data
column in the flag table in Magento 2 is a TEXT, which is too short; it can only hold 65535 characters! It therefore cuts off the serialized data, making it corrupt.
Maybe this is a solution; ALTER TABLE flag MODIFY flag_data LONGTEXT COMMENT 'Flag Data';
?
Preconditions
- Magento 2.2
Steps to reproduce
- Dump a large enough configuration file and import it (message me for an example file, it contains client data but willing to share with Magento employees) -- you should also be able to create a large config.php by inserting large data sets into the
translation
table, since it also exports i18n settings.
Expected result
- It should import
app/etc/config.php
Actual result
- Message;
Import failed: Unable to unserialize value, string is corrupted.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.3 release lineGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release