Skip to content

fix: customer.language maps to shopId, not localeId - adding correct association#13

Merged
Jozsef Damokos (jozsefdamokos) merged 11 commits into
shopware:trunkfrom
PantherX99:patch-1
Jun 26, 2026
Merged

fix: customer.language maps to shopId, not localeId - adding correct association#13
Jozsef Damokos (jozsefdamokos) merged 11 commits into
shopware:trunkfrom
PantherX99:patch-1

Conversation

@PantherX99

Copy link
Copy Markdown
Contributor

when migrating, unnecessary / unused languages are created. this is due to the mapping of customer.language which maps to the shopid and not the localeid.

this causes SWAG_MIGRATION_WRITE_EXCEPTION errors, because it assigns a wrong language id to the customer, so the customer cant be created and their order neither as well.

[/languageId] The language "019e88ab8071730686a04a88ca695f99" is not assigned to the sales channel. in /var/www/vhosts/c8yb4.creoline.cloud/httpdocs/vendor/shopware/core/Framework/DataAbstractionLayer/Write/WriteContext.php:46
Converted data (JSON):

/**

Id of the language sub shop
var string
Orm\Column(name="language", type="string", length=10, nullable=false)
*/
private $languageId = '1';

Added additional joins for customer language and shop ID mapping.
Added left joins to fetch customer locale IDs along with language. customer.language maps to shopID and not directly to localeID

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion for the PR title:

fix: resolve customer language through shop locale

This would be a bit shorter and describes the fix rather than the issue.

Comment thread Service/LanguageService.php
Comment thread Repository/CustomerRepository.php
Comment thread Repository/CustomerRepository.php Outdated
@jozsefdamokos Jozsef Damokos (jozsefdamokos) merged commit 1768834 into shopware:trunk Jun 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution A PR contributed by a community member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants