Skip to content

fix: customer language mapping#182

Merged
Lars Kemper (larskemper) merged 6 commits into
trunkfrom
fix/customer-conversion
Apr 28, 2026
Merged

fix: customer language mapping#182
Lars Kemper (larskemper) merged 6 commits into
trunkfrom
fix/customer-conversion

Conversation

@larskemper

@larskemper Lars Kemper (larskemper) commented Apr 23, 2026

Copy link
Copy Markdown
Member

resolves #SWAG-327674 support ticket

Problem

Fixes a Shopware 5 customer migration issue where languageId could be missing even though the customer locale was already known in the same migration run.

CustomerConverter resolved the customer language only through LanguageLookup, which checks existing SW6 language entities. In affected runs, a language mapping for the locale already existed, but the target language entity had not been persisted yet. That left languageId unset.

Changes

  • add a shared Shopware converter helper that resolves a language by: existing language mapping for locale & fallback to LanguageLookup
  • switch CustomerConverter to use this helper for customerlanguage.locale

@larskemper

Copy link
Copy Markdown
Member Author

Malte Janz (@MalteJanz) I'm not fully sure whether the previous "LanguageLookup only, no mapping lookup" behavior was intentional?

Comment thread src/Profile/Shopware/Gateway/Local/Reader/LanguageReader.php
@MalteJanz

Malte Janz (MalteJanz) commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Lars Kemper (@larskemper) just saw your question, but a late answer is still better than no answer I guess ✌️ 🙈

Malte Janz (@MalteJanz) I'm not fully sure whether the previous "LanguageLookup only, no mapping lookup" behavior was intentional?

No I don't think that was intentional and we likely overlooked that we have to do both in most places 😬
Now I'm also wondering if we broke other things with the introduction of these LookupServices as well or if languages are the exception. I mean we should only have this issue if it's an entity we migrate as well as lookup 🤔

@larskemper

Copy link
Copy Markdown
Member Author

... wondering if we broke other things with the introduction of these LookupServices as well or if languages are the exception. I mean we should only have this issue if it's an entity we migrate as well as lookup 🤔

Makes sense, thanks. Not sure either whether languages are the only affected case, so we should probably take a look at the other LookupServices as well.

@larskemper Lars Kemper (larskemper) merged commit 924c0bf into trunk Apr 28, 2026
8 checks passed
@larskemper Lars Kemper (larskemper) deleted the fix/customer-conversion branch April 28, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants