Open bartoszkubicki opened 4 years ago
Magento 2.4.6-p2 Akeneo connector v104.0.3
We experienced same problem today. This is due this line for attribute en option import job > https://github.com/akeneo/magento2-connector-community/blob/f8cf0d2a6285bc7ba2f191de97197e9df47cf4f8/Job/Option.php#L270
This gets the default locale from the database via the scopeConfig with scope 'store' in https://github.com/akeneo/magento2-connector-community/blob/f8cf0d2a6285bc7ba2f191de97197e9df47cf4f8/Helper/Config.php#L1144-L1151
We did not a deep dive in the store resolving of Magento but this is what we think the problem is and what we fixed to get it working for our side:
our assumption what is causing this issue is due to because no $storeId is given as argument to the getDefaultLocale
function it tries to get the first available store which != store 0 and initiate this store to be used as default store but the language of the actual admin store can be different then the first store.
so we changed this line https://github.com/akeneo/magento2-connector-community/blob/f8cf0d2a6285bc7ba2f191de97197e9df47cf4f8/Helper/Config.php#L1144 to
public function getDefaultLocale($storeId = 0)
so it will always load default admin store 0 instead of the first available store that is not the default store.
we get it working.
We don't know if this is a bug in Akeneo connector or in Magento but we don't have enough time to figure this one out completely to the bottom so hope it will give other users to the right direction for a complete answer.
Environment and configuration
Steps to reproduce
Expected result
Actual result