View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000976 | OXID eShop (all versions) | 1.06. Search, Tags | public | 2009-06-05 11:49 | 2012-12-07 14:42 |
Reporter | holgt | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | unable to reproduce |
Status | resolved | Resolution | fixed | ||
Product Version | 4.1.1 revision 18442 | ||||
Fixed in Version | 4.1.4 revision 21266 | ||||
Summary | 0000976: DB error on Sorting, so Category listing instead | ||||
Description | When clicking on a Tag in the Tag list or the Start Page, the Category listing shows up, instead of the assumed Tag Search Result. Using Debugging settings in config, it turned out to be wrong sorting in the SQL: Unknown column 'oxarticles.oxarticles.oxid so i fixed it this way: if ( $this->_sCustomSorting ) { if(stristr($this->_sCustomSorting,$sArticleTable)){#Holger Trahe check for nested ArticleTable Info $sQ .= " order by {$this->_sCustomSorting} "; }else{ $sQ .= " order by {$sArticleTable}.{$this->_sCustomSorting} "; } } | ||||
Additional Information | 2009-06-05 11:43:51exception 'ADODB_Exception' with message 'mysql error: [1054: Unknown column 'oxarticles.oxarticles.oxid' in 'order clause'] in EXECUTE("select oxarticles.oxid, oxarticles.oxtitle, oxarticles.oxparentid, oxarticles.oxvarselect, oxarticles.oxvarstock, oxarticles.oxicon, oxarticles.oxstock, oxarticles.oxstockflag, oxarticles.oxprice, oxarticles.oxvat, oxarticles.oxskipdiscounts, oxarticles.oxunitquantity, oxarticles.oxvarminprice, oxarticles.oxshopid, oxarticles.oxartnum, oxarticles.oxthumb, oxarticles.oxtprice from oxartextends inner join oxarticles on oxarticles.oxid = oxartextends.oxid where match ( oxartextends.oxtags ) against( 'fashionjacke' ) and ( oxarticles.oxactive = 1 and ( oxarticles.oxstockflag != 2 or ( oxarticles.oxstock + oxarticles.oxvarstock ) > 0 ) and ( oxarticles.oxvarcount=0 or ( select count(art.oxid) from oxarticles as art where art.oxstockflag=2 and art.oxparentid=oxarticles.oxid and art.oxstock=0 ) < oxarticles.oxvarcount ) ) order by oxarticles.oxarticles.oxid LIMIT 0, 24") ' in /Library/WebServer/Documents/backupstylo/core/adodblite/adodb-exceptions.inc.php:84 Stack trace: #0 /Library/WebServer/Documents/backupstylo/core/adodblite/adodbSQL_drivers/mysql/mysql_driver.inc(369): adodb_throw('mysql', 'EXECUTE', 1054, 'Unknown column ...', 'select oxarticl...', false, Object(object_ADOConnection)) #1 /Library/WebServer/Documents/backupstylo/core/adodblite/adodb.inc.php(334): mysql_driver_ADOConnection->do_query('select oxarticl...', 0, 24, false) #2 /Library/WebServer/Documents/backupstylo/core/oxlist.php(402): ADOConnection->SelectLimit('select oxarticl...', 24, 0) #3 /Library/WebServer/Documents/backupstylo/core/oxarticlelist.php(98): oxList->selectString('select oxarticl...') #4 /Library/WebServer/Documents/backupstylo/core/oxarticlelist.php(633): oxArticleList->selectString('select oxarticl...') #5 /Library/WebServer/Documents/backupstylo/views/tag.php(150): oxArticleList->loadTagArticles('fashionjacke', 0) #6 /Library/WebServer/Documents/backupstylo/views/tag.php(245): Tag->_loadArticles(NULL) #7 /Library/WebServer/Documents/backupstylo/views/alist.php(371): Tag->getArticleList() #8 /Library/WebServer/Documents/backupstylo/views/tag.php(346): aList->_collectMetaDescription(false, 1024, false) #9 /Library/WebServer/Documents/backupstylo/views/oxubase.php(1102): Tag->_prepareMetaDescription(false) #10 /Library/WebServer/Documents/backupstylo/views/oxubase.php(2181): oxUBase->getMetaDescription() 0000011 /Library/WebServer/Documents/backupstylo/views/tag.php(96): oxUBase->render() 0000012 /Library/WebServer/Documents/backupstylo/views/oxshopcontrol.php(265): Tag->render() 0000013 /Library/WebServer/Documents/backupstylo/views/oxshopcontrol.php(85): oxShopControl->_process('tag', NULL) 0000014 /Library/WebServer/Documents/backupstylo/index.php(112): oxShopControl->start() 0000015 /Library/WebServer/Documents/backupstylo/oxseo.php(38): require('/Library/WebSer...') 0000016 {main} --------------------------------------------- | ||||
Tags | Tags | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
Reminder sent to: holgt Hello, I can't reproduce the case with standard demodata. could you please provide information, what it is entered in your shop Core settings -> Settings -> 'Database Fields Product Lists can be sorted after' option? greetings, Birute M. |
|
We cannot reproduce it. But since the fix for the source code is place with error message, need to debug it from the source code side. @DEvelopers: please check this case from the source code side. |
|
this error is most likely because of "oxarticle.oxid" instead of just oxid is passed to sorting parameters (e.g. from template) also - added checks for dot char in sorting field, and if it is present, oxarticles (or oxarticles view in EE) table will not be prepended. |