View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005666 | OXID eShop (all versions) | 4.01. Database handling | public | 2014-02-20 23:17 | 2014-04-11 16:38 |
Reporter | [email protected] | Assigned To | |||
Priority | high | Severity | major | Reproducibility | sometimes |
Status | resolved | Resolution | no change required | ||
Product Version | 4.8.3 / 5.1.3 | ||||
Target Version | 4.8.5 / 5.1.5 | ||||
Summary | 0005666: Count of articles is wrong in article listing | ||||
Description | The article count is not always right in the article listing. I fixed this for my setup by adding GROUP BY $sArticleTable.oxid to the select statement in oxarticlelist.php in the function _getCategorySelect() | ||||
Tags | Category | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
related to | 0005736 | resolved | aurimas.gladutis | oxobject2category index OXMAINIDX should be unique |
|
Reminder sent to: [email protected] Hi, Unfortunately we can't reproduce this bug. Could you please give us more details how to reproduce this case? Best regards |
|
Hi, the problem occurred when we wanted to display 108 articles in the category listing (the complete category has about 400 articles). We noticed the wrong number because we have a three column design and in the last row there was always missing one article. So the design was screwed. When I looked at the count of articles which was displayed it was 83, not 108. Hope I could help you. I dont know, this maybe a problem which only occurs after some time (the shop is online since 2012). Best regards Max |
|
Maybe this is caused by bugs in 3rd party importers, which assign articles twice to category, i have seen this happen. Execute the following SQL in Shop with demodata: INSERT INTO `oxobject2category` (`OXID`, `OXOBJECTID`, `OXCATNID`, `OXPOS`, `OXTIME`, `OXTIMESTAMP`) VALUES ('b964ba2b2fac8f9fd44b7ce743273539', 'b56369b1fc9d7b97f9c5fc343b349ece', '0f4fb00809cec9aa0910aa9c8fe36751', 0, 0, '2014-02-21 11:10:56'); Now look at category kites in frontend, one article is missing on first page. Maybe Solution would be to set Index OXMAINIDX unique, so this can't happen. |
|
This was my first thought too, since the products are imported, but I already checked this when I debugged, the articles "are lost" in oxList::selectString() in the following lines: if ($oListObject->getId()) { $this->_aArray[$oListObject->getId()] = $oListObject; } I checked some IDs which are double in the oListObject but in the database they are unique, I have no clue where this came from. I will later investigate further maybe I'll find something. |
|
To test you can try to change oxobject2category index OXMAINIDX to unique, if you get an error you have duplicates. |
|
yes the reason is the duplicated assignment of article to category, grouping will solve it but it can bad for performance. it is better to keep data clean (without duplication) in database. so solution is to fix importer. |