View Issue Details

IDProjectCategoryView StatusLast Update
0004464OXID eShop (all versions)2.4. Administer productspublic2023-11-20 10:01
Reportercpjolly Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status confirmedResolutionopen 
Product Version4.0.0.0 revision 13895 
Summary0004464: oxidadminlist->buildWhere too simplistic for imported category OXIDs
DescriptionThis bug exists in all versions of OXID 4.x.x

If you import categories from an external ERP, the category Ids may not be pseudo-random. In our case, the category OXIDs are for example C1, C2, ... C20, C21, ... C200, C201, ...

If this is the case, then the function buildWhere() in oxidadminlist.php will not work correctly.

For example, in the category admin view, if you filter the list by selecting a category with the OXID = C20, all child categories with OXPARENTID = C20, C200, C201 will be displayed rather than just child categories with OXPARENTID = C20.

This is because buildWhere encloses the OXID with % wildcards:

oxidadminlist.php Line 528: $this->_aWhere[$sName] = "%{$sValue}%";

Not sure why the % wildcards are necessary. If they are not, then the resolution is to remove them.

Note: we are not using the OXID SOAP interface - we have our own ERP interface.
Steps To ReproduceCreate three categories and use phpmyadmin to set their OXIDs = C20, C200, C201
Create some child categories for each of these categories

Filter the admin category list by selecting the category with the OXID = C20 from the dropdown.

All child categories with OXPARENTID = C20, C200, C201 will be displayed rather than just child categories with OXPARENTID = C20.
TagsCategory, Import
Attached Files
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

dainius.bigelis

2012-10-09 10:29

reporter   ~0007577

Offered solution to remove % is not very good, as it might trigger other issues in other cases. So we will check what is better way to fix it in general.

QA

2023-11-16 15:45

administrator   ~0015768

not fixed, please see attached screenshot Screenshot 2023-11-16 at 14.56.31.png
-MK