View Issue Details

IDProjectCategoryView StatusLast Update
0005345OXID eShop (all versions)4.09. SEO, SEO URLpublic2015-12-01 10:37
Reporterb.hasis 
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version4.6.5 revision 49955 
Target VersionFixed in Version 
Summary0005345: oxSeoEncoderCategory _aCatCache will break if you try to load cross shop urls
DescriptionThe Logic of the _aCatCache will break when you try to load a URL of a Category from a other shop with the same Language:

Lets say you got 2 shops with the same Language and 1 Category in both Shops:
shopId : 1, Language : de , Category Name/Url : Kätzchen - shop.de/Kaetzchen/
shopId : 2, Language : de , Category Name/Url : Büsi - shop.ch/Buesi/
The only diffents will be the URLs for a better seo in .ch.

Now you try to load in the .de Shop a Link to the same Category in the .ch shop you will get
shop.ch/Kaetzchen/ because oxcategory::getBaseSeoLink() will work with the instance of oxSeoEncoderCategory and this instance has allready stored in _aCatCache the url of the shop 1 category for the language de.

The Problem is that the cachekey will only combined by the category id and the lang, the current ShopId will not be included.

So Please put in The Shop Id. Like:
oxSeoEncoderCategory ::_getCategoryCacheId()
{
return $oCat->getId() . '_' . ( (int) $iLang ).'_'.oxConfig::getInstance()->getShopId();
}

and in oxSeoEncoderCategory ::getCategoryUri all uses of
$this->_aCatCache[$sId.'_'.$iLang.'_'.oxConfig::getInstance()->getShopId()]
TagsCategory, SEO
ThemeNot defined
BrowserAll
PHP VersionNot defined
MySQL VersionNot defined

Activities

There are no notes attached to this issue.