View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005345 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2013-08-20 09:39 | 2023-11-29 15:52 |
Reporter | b.hasis | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.6.5 revision 49955 | ||||
Fixed in Version | 6.0.0-beta.2 | ||||
Summary | 0005345: oxSeoEncoderCategory _aCatCache will break if you try to load cross shop urls | ||||
Description | The 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()] | ||||
Tags | Category, SEO | ||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||