View Issue Details

IDProjectCategoryView StatusLast Update
0003475OXID eShop (all versions)2. ----- eShop backend (admin) -----public2012-02-07 15:18
Reporterwanis Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Summary0003475: wrong SQL formation in oxadminlist::init()
Descriptionin article_list::_changeselect() there are appending where condition, but in oxadminlist::init orderby clause is already set in sql, this causes SQL error.

oxadminlist::init() line 191:
..
            $sSql = $this->_prepareOrderByQuery( $sSql );

            $sSql = $this->_changeselect( $sSql );
..

article_list::_changeselect() line 211:
..
        switch ($sType) {
..
            case 'mnf':
                $sSql.= " and $sTable.oxmanufacturerid = ".oxDb::getDb()->quote($sValue);
                break;
..
        return $sSql;

Steps To Reproducego to administer products
in list select one of manufacturer
select custom column (let say oxartnum)
after enter(or click search button) article list shows all articles.
Additional Informationfor quick fix, change the order in oxadminlist::init() to this:

           $sSql = $this->_changeselect( $sSql );
           $sSql = $this->_prepareOrderByQuery( $sSql );
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

mindaugas.rimgaila

2012-02-07 15:17

reporter   ~0005690

Last edited: 2012-02-07 15:19

Method "_changeselect()" is reserved for user custom (last) modifications of the query, before passing it to execution. Checked in source code, this method is only defined, it's transparent and does not change anything.