Skip to content

app:config:import fails - flag column 'flag_data' is too short ? #11657

Closed
@peterjaap

Description

@peterjaap

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

  1. Magento 2.2

Steps to reproduce

  1. 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

  1. It should import app/etc/config.php

Actual result

  1. Message; Import failed: Unable to unserialize value, string is corrupted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions