View Issue Details

IDProjectCategoryView StatusLast Update
0005345OXID eShop (all versions)4.09. SEO, SEO URLpublic2023-11-29 15:52
Reporterb.hasis Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.6.5 revision 49955 
Fixed in Version6.0.0-beta.2 
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
Database VersionNot defined

Activities

SvenBrunk

2023-11-29 15:52

administrator   ~0015988

Fixed in 6.0-beta2 similar to your suggestion