View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005625 | OXID eShop (all versions) | 4.01. Database handling | public | 2014-01-27 15:53 | 2015-02-27 14:36 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | immediate | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.8.1 / 5.1.1 | ||||
Target Version | 4.7.11 / 5.0.11 | Fixed in Version | 4.7.11 / 5.0.11 | ||
Summary | 0005625: amount of view tables does not depend on amount of languages per shop | ||||
Description | Depending of activated shop and the activated languages, the view generating generates different language tables This is because of oxShop::generateViews() which only gets the registered and activated languages of the current shop id: $aLanguages = oxRegistry::getLang()->getLanguageIds(); | ||||
Steps To Reproduce | Shop Id 1 has two languages:
Shop Id 2 has three languages (Please note the sequence, maybe this is relevant):
switch to shop id 1 and generate the views. You will get: oxv_oxarticles_1_de oxv_oxarticles_1_en oxv_oxarticles_2_de oxv_oxarticles_2_en Now, switch to shop id 2 and generate the views again: oxv_oxarticles_1_de oxv_oxarticles_1_en oxv_oxarticles_1_fr oxv_oxarticles_2_de oxv_oxarticles_2_en oxv_oxarticles_2_fr The bold one is incorrect. | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
Shop creates views for all shops one by one. That's why we cannot rely on information about active shop. From 5.0 to all upper versions: oxShopViewValidator validates not by active shop, but by shop id from oxShop. In class oxShop $oViewsValidator->setShopId( $this->getConfig()->getShopId() ); changed to $oViewsValidator->setShopId( $this->getId() ); Only for 5.0: oxShopViewValidator validates view independent from subshop (like oxv_oxshops_de) by all shop languages. Add protected method to get all languages. Only for 5.0 Enterprise version: In class oxShop we do not take language id's from oxLang class. Instead we take it from database in oxShop class private method _getLanguageIds. From 5.1 to all upper versions: Class oxLang interface changes. Method getLanguageIds($iShopId = null) now return languages by shop id or by active shop. We add method getAllShopLanguageIds which returns all languages from all shops. oxShop get languages from oxLang method getLanguageIds by shop id. oxShopViewValidator take all languages from oxLang getAllShopLanguageIds method. |