View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006659 | OXID eShop (all versions) | 2.3. Extensions (modules, themes) | public | 2017-07-03 10:27 | 2017-07-26 08:00 |
Reporter | AlexN | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 6.0.0-rc.1 | ||||
Fixed in Version | 6.0.0-rc.2 | ||||
Summary | 0006659: Deactivating a module which extends basket causes shop maintenance mode | ||||
Description | When deactivating a module which extends basket (e.g. \OxidEsales\Eshop\Application\Model\Basket::class) and then deactivate the module, the backend continues to run in maintenance mode and cannot be used anymore until the module directory is renamed. It is related to the session key "1_basket" (<shopid>_basket)) which is returned from the method "\OxidEsales\EshopCommunity\Core\Session::_getBasketName". What exactly is happening: For a reason I did not figured out yet there is a seralized basket object saved in the session key "1_basket" when being in the OXID eShop backend. This stores in my case instead of "[...]Basket" "[...]SofortueberweisungBasket" and is not renewed when deactivating the module. So, OXID core tries to unserialize it with a not existing class. Obviously this fails. In OXID 4.10.4 this seems to work properly - I have made a quick check by myself using "mail(... print_r($_SESSION, true))" and the serialized object is updated accordingly. A workaround is to unset this session key on module deactivation. However, this seems to be inappropriate as other modules probably rely on this session key. | ||||
Tags | Basket, Module, Session | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Hi, I can't reproduce this. I made a plain extension of the basket: oxstestbasket.php: class oxstestbasket extends oxstestbasket_parent {} metadata.php: 'extend' => array( \OxidEsales\Eshop\Application\Model\Basket::class => 'oxs/b6659/oxstestbasket' ), Then I activated and deactivated the module. After that I could use the backend as usually. In case I miss something, please provide a detailed step by step guide therefore I can reproduce this. |
|
I have been using namespace classes provided by OXID and in my module namespaces as well. Looks like you have tested without a namespace. Otherwise I will provide more details asap. best regards Alex |
|
Reproduced. As you wrote, a workaround is to delete the session variable during the event onDeactivate: \OxidEsales\Eshop\Core\Registry::getSession()->delBasket(); |