Magento 2.2 introduces a major change in matter of serialization.

There are several tables in the Magento database that includes fields with serialized values. The best example for this scenario is the catalogrules tables. Every rule data value is serialized in a single field.

Magento 2.2 introduces json serialization instead of the regular serialization. So when you try to deploy a project for the first time, and you run a setup:upgrade command, this could fail depending on the table contents.

For instance, you could have a third party extension that may use the same structure than the catalog rules, so if that is the case, you should check your database tables and remove those values or change the serialization to json encode manually.

For instance, if you receive and error like this:

Error converting field ‘info’ in table ‘magento_logging_event’

Given that case, we went to the database and truncated that table, along with the magento_logging_event_changes table.

That fixed the issue for us.

In conclusion, if this is the same scenario for you, you can just truncate the tables, otherwise you will need to perform a better research of what needs to be manually unserialized and json-encoded.

For more information, visit the Magento 2.2 release notes regarding this topic.

UPDATE: This issue was resolved by Magento within the version 2.2.1. For more information look at the releases notes.

Leave a comment