View Issue Details

IDProjectCategoryView StatusLast Update
0006846OXID eShop (all versions)4.12. Subshop handlingpublic2024-07-10 15:37
Reporteranton.fedurtsya Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.0.2 
Fixed in Version6.2.0 
Summary0006846: Wrong language id used in views fields generation
DescriptionWrong 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 ReproduceEnsure 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 InformationThe 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.
TagsInternationalization Rework
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0006081 assignedHR Views get broken when Language base IDs of specific Languages deviate in Subshops 
related to 0006080 assignedHR Subshop language destroys language handling 

Activities

anton.fedurtsya

2018-06-21 10:06

administrator   ~0012516

Related pull request with views regeneration fix:

https://github.com/OXID-eSales/oxideshop_ce/pull/647

nitin.singh

2020-01-31 11:26

reporter   ~0013108

Last edited: 2020-01-31 11:33

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.