Despite its popularity and flexibility, Magento 1 has continually faced performance-related issues, which caused the Magento team to release the upgraded Magento 2 platform. With the release of updated Magento 2 version, the number of people who tend to migrate their online stores from Magento 1 to Magento 2 is constantly growing.
In most cases, the migration process follows the same algorithm that can be found in official documentation; however, some challenging situations might arise. To help make the migration procedure easier, we want to give you a few examples of problematic cases and explain how these challenges can be addressed with the help of the Data Migration Tool.
1. The problem with displaying Shipping and Billing Addresses in the Order and Customer information forms.
This problem occurs because of incorrect ID values in the table M2 eav_attribute_set. After data migration with the help of the Data Migration Tool, new entries with the attribute sets from Magento 1 are added to this table, but the existing entries in this table are not do not get deleted. Thus, the new attribute sets have ID values which differ from those defined in the constants in the Magento classes.
The ID of the attribute set with the “Customer” type after the migration is 16, but the value in the class is:
Magento\Customer\Api\CustomerMetadataInterface and the constant ATTRIBUTE_SET_ID_CUSTOMER = 1
The ID of the attribute set with the “Customer_address” type after the migration will be 17, but the values in the class is:
Magento\Customer\Api\AddressMetadataInterface and the constant ATTRIBUTE_SET_ID_ADDRESS = 2
As you can see this mismatch becomes the reason for such errors, as shown in the above screenshot.
To eliminate this problem, we recommend executing a request to delete the current records of the eav_attribute_set table before starting the migration to a clean Magento 2 database:
DELETE FROM `eav_attribute_set` WHERE 1
2. The Simple Product type automatically changes to the Virtual Product type in the Magento 2 dashboard when saving/updating this type of product after the migration.
The reason for this problem is that the method that determines if the product has the necessary “Weight” attribute returns a negative result, but in Magento 2, in such a situation the product type automatically changes from Simple Product to Virtual Product.
To fix this error after the migration to Magento 2 you need to execute the following requests:
UPDATE 'catalog_eav_attribute' SET `apply_to' = 'simple, virtual, downloadable, configurable, bundle' WHERE `attribute_id' = (SELECT `attribute_id' FROM `eav_attribute' WHERE `attribute_code' = 'weight')
UPDATE `catalog_eav_attribute' SET `apply_to' = 'bundle' WHERE `attribute_id' = (SELECT `attribute_id' FROM `eav_attribute' WHERE `attribute_code' = 'weight_type')
3. The customer data did not migrate to Magento 2 database.
Sometimes the situation happens when the customer data doesn’t migrate and all the tables with the “customer_” prefix are empty after the migration is performed.
In this case, we recommend performing the following actions:
1. Edit the block in the config.xml file (you need to remove all the steps, just leave the “Customer Attributes” step):
<steps mode="data"> <step title="Customer Attributes Step"> <integrity>Migration\Step\Customer\Integrity</integrity> <data>Migration\Step\Customer\Data</data> <volume>Migration\Step\Customer\Volume</volume> </step> </steps>
2. Run the command to migrate data:
bin/magento migrate: data vendor/magento/data-migration-tool/etc/your-path-to-config-xml/config.xml
4. It is impossible to log in to the client’s account after the migration.
After the migration, it is possible that the previous credentials of clients stop working and the authentification problem occur on the website. This may happen because the password hash update option has not been installed in the migration settings (сonfig.xml). But the hash in Magento 2 differs from the hash in Magento 1 (crypt key in etc/env.php in M2 and in app/etc/local.xml in M1), which should prevent authentication problems.
In order to avoid such a problem, we recommend setting the following parameter:
update_customer_password_hash = 1 in config.xml before the migration
If you have already performed the migration and it is problematic to perform it again, you need to change the value of crypt_key in Magento 2 and make it equal to the value of crypt_key from Magento 1.
In order to deliver a superior customer experience, the e-Commerce site owners need to perform the optimization of their online stores to outperform competitors and migration from Magento 1 to Magento 2 is among the key considerations for online store owners.
If you require any assistance to migrate from Magento 1 to Magento 2 or create efficient solutions to improve the customer experience of your e-Commerce platform, Mage Devs is here to help.