View Issue Details

IDProjectCategoryView StatusLast Update
0006928OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2018-12-04 14:21
Status acknowledgedResolutionopen 
Product Version6.0.2 
Target VersionFixed in Version 
Summary0006928: Categorienames at the end of an url consisting only of digits are interpreted as page numbers
DescriptionSuppose to have a category structure like batterie/2032/ then clicking to this categorie the shop will make an redirect to batterie/

This happens in Controller/ArticleListController.php in function _checkRequestedPage():

        if ($pageCount && (($pageCount - 1) < $currentPageNumber)) {
            \OxidEsales\Eshop\Core\Registry::getUtils()->redirect($this->getActiveCategory()->getLink(), false);

the interpretion of digits in an url only as page number happens in Core/SeoDecoder.php, function extractPageNumberFromSeoUrl($seoUrl). With this grep pattern all numbers become page numbers:

preg_match('/(.*?)\/(\d+)\/(.*)/', $seoUrl, $matches)

We think at this point the software has to check if the number ist an exsting category.
Tags404, Category, Redirect
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
MySQL VersionNot defined



2018-12-04 14:21

administrator   ~0012718


as this is a specific use case I changed the entry to a feature request, so our PM can check it. Also because the shop is working as intended: Digits at the end of an URL are to interpreted as page numbers.
In the meantime I suggest to give the category a prefix to identify them as a category and not as a page number like ""

Kind regards,