Single locale code bug silently wiped 92% of data in Magento-to-Shopware migration

A developer migrating a real-world Magento store to Shopware 6 discovered that 13,153 of 13,154 orders failed to transfer, along with the majority of customers and products. The migration tool reported success with a 'Done' status despite only a fraction of the data arriving in the target database. The root cause was a single locale code mismatch: Magento stores Chinese locales using BCP-47 script subtags like zh-Hans-CN, but Shopware's locale table only recognises zh-CN, causing a lookup failure with no fallback. Because the language could not be created, dependent sales channels were never built, and all data scoped to those channels failed foreign key checks at the write stage. Any Magento store using Chinese store views or other script-subtag locales such as sr_Latn or uz_Latn is affected, and the fix requires patching the locale converter before running the migration.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in