View Issue Details

IDProjectCategoryView StatusLast Update
0005625OXID eShop (all versions)4.01. Database handlingpublic2015-02-27 14:36
Reportermichael_keiluweit 
PriorityimmediateSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.8.1 / 5.1.1 
Target Version4.7.11 / 5.0.11Fixed in Version4.7.11 / 5.0.11 
Summary0005625: amount of view tables does not depend on amount of languages per shop
DescriptionDepending 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 ReproduceShop Id 1 has two languages:

  • de

  • en



Shop Id 2 has three languages (Please note the sequence, maybe this is relevant):


  • de

  • fr

  • en



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.
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP Versionany
Database Versionany

Activities

saulius.stasiukaitis

2014-02-18 17:21

reporter   ~0009519

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.