View Issue Details

IDProjectCategoryView StatusLast Update
0002522OXID eShop (all versions)4.08. Cachepublic2012-12-10 13:39
Reportertjungcl Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.4.6 revision 32697 
Summary0002522: article _resetCache: several bugs
Description- resets nothing when frontend and blUseStock is false. For example, frontend-user adds a new tag, but the article-cache is not reseted.

- deletes the whole cache, if article is part of an action. However, it does not delete the cache, if the article is part of an action and has a parent, which is NOT part of an action.

- wrong parentid is used if sOxId-param is defined and $this has an id too (then it uses this->oxparentid instead of the parent of sOxId)

- as implemented now, the sOxId-params only effect is, that the cache is completly reset, if sOxId-param is part of an action. After having checked that (and if it was NOT part of an action), the sOxId-param is replaced with this->oxid and the rest of the reset-code is evaluated with this->oxid. So, the function called with sOxId does not really reset the cache for $sOxId, but does a bit reseting with sOxId, and the rest with $this->oxid.




Additional Informationsuggestions for fixes:

    //OxId-Param-Fix. Also fixes wrong parent-id-bug.
    protected function _resetCache( $sOxId = null ){
        //if function is called with oxid !== this, load that article (simple + stock) and run resetcache there.
        if ($sOxId and $sOxId !== $this->getId()){
            $oArt = oxNew( 'oxarticle' );
            $oArt->setSkipAssign(true);
            $oArt->load($sOxId);
            $oArt->_assignStock();
            return $oArt->_resetCache();
        }
        ...

        //fix for oxid-action vs parentid-action
        $sQ = "select 1 from oxactions2article where oxartid=$sOxIdQuoted";
        if ($sParentId) $sQ.=" or oxartid=".$oDb->quote($sParentId);
        ...
    }

// if dont have a suggestion for the blUseStock bug.

    
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

birute_meilutyte

2011-05-02 12:56

reporter   ~0004430

@developers: check from source code side, if such issue still exist

aurimas.gladutis

2012-11-23 10:26

reporter   ~0007957

Hi, thank you for your contribution. As all the issues mentioned here is already fixed, i am closing this ticket.
If you still have anything to add or we have missed something, please reopen this ticket.