View Issue Details

IDProjectCategoryView StatusLast Update
0003118OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:15
ReporterMoehlis Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionPast development 
Fixed in Version4.5.2 revision 38481 
Summary0003118: inactive manufacturer accessable
Descriptionwhen deactivating manufacturers, they are accessable by directlink
Steps To Reproducesetup standard 4.5.1
goto start page
click on a manufacturer
deactivate this manufacturer
reload the manufacturers listpage

nothing will happen because in this case the active flag is ignored
Additional Informationtested in 4.5.1 and 4.4.5

possible fix in core/oxmanufacturer.php:


public function getSqlActiveSnippet( $blForceCoreTable = null )
{
    $sTable = $this->getViewName( $blForceCoreTable );

    $sQ = " $sTable.oxactive = 1 ";

    return "( $sQ ) ";
}
TagsManufacturer
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

Moehlis

2011-08-09 10:46

reporter   ~0004959

better solution would be fixing the check in oxbase::getsqlactivesnippet()

// has 'active' field ?
if ( isset( $this->_aFieldNames['oxactive'] ) ) {
    $sQ = " $sTable.oxactive = 1 ";
}

this check fails on the oxmanufacturer

Moehlis

2011-08-09 11:08

reporter   ~0004961

ok...fix doesnt work in 4.4.5

Moehlis

2011-08-09 11:21

reporter   ~0004962

Last edited: 2011-08-09 11:37

i could not figure out what happens in 4.4.5, so i just created this hotfix for our project, might be helpfull for others:

/**
 * adds active check to manufacturer
 * https://bugs.oxid-esales.com/view.php?id=3118
 */
class FcBugFixManufacturerList extends FcBugFixManufacturerList_parent {
    
    /**
     * hotfix. just checking oxactive check after manufacturer was already loaded because checking within oxmanufacturer doesnt work
     * and results in just loading another manufacturer, what is currently unexplainable
     */
    public function getActManufacturer()
    {
        parent::getActManufacturer();

        if ( $this->_oActManufacturer->oxmanufacturers__oxactive->value != 1 ) {
            $this->_oActManufacturer = null;
            error_404_handler();
        }
        
        return $this->_oActManufacturer;
    }
}

Linas Kukulskis

2011-08-19 16:03

reporter   ~0005071

added in manufacturerlist view $oManufacturer->getIsVisible() in getarticlelist()