View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006846||OXID eShop (all versions)||4.12. Subshop handling||public||2018-06-21 10:00||2020-01-31 11:33|
|Target Version||Fixed in Version|
|Summary||0006846: Wrong language id used in views fields generation|
|Description||Wrong language id is used in views fields linking when we have a gap in language ids, like 0, 1, 2, 4 (no 3), so for last language the field ids will be wrong.|
|Steps To Reproduce||Ensure you have some 3 or more languages in subshop: de(0), en(1), ru(2)|
Regenerate views, so you can see correct ids are used for "ru" language views:
select `oxarticles`.`OXID` AS `OXID`, ... `oxarticles`.`OXTITLE_2` AS `OXTITLE` ...
Remove some not first and not last language, in our case only "en" fits the requirement.
Run console views regeneration command, or in admin, activate some other then "subshop" shop, and run views regeneration in mall.
You can see wrong language fields are used for "ru" language views:
select `oxarticles`.`OXID` AS `OXID`, ... `oxarticles`.`OXTITLE_1` AS `OXTITLE` ...
which is wrong, and will cause huge problems on more complex shops.
|Additional Information||The method OxidEsales\EshopCommunity\Core\Language::getLanguageIds name is missleading, it do not care about the actual id's of the languages, but just gives the list of languages somehow calculated from several shops. The problem is - what method returns while used with shopId which doesnt match current active shop id. Need to check this case everywhere in code, but looks like its only used in views generation.|
|Tags||No tags attached.|
|PHP Version||Not defined|
|Database Version||Not defined|
Related pull request with views regeneration fix:
Interesting, regenerating views for languages in subshop: de(0), en(1), da(4) worked for me. I am using shop Enterprise Edition 6.2.0-rc.1 version.