View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006202 | OXID eShop (all versions) | 1.03. Basket, checkout process | public | 2015-07-23 16:34 | 2015-08-10 16:06 |
Reporter | lygie | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | no change required | ||
Product Version | 4.9.4 / 5.2.4 | ||||
Summary | 0006202: unserializeing oxBasket thows fatal error when oxAtricle is exented | ||||
Description | If a module extends the oxArticle class and a user is send to an external Payment during order process, when being sent back to the show the system throws an error "The script tried to execute a method or access a property of an incomplete object" | ||||
Steps To Reproduce | 1) Extend oxArticle with module class $aModule = array( 'id' => 'xxx', 'title' => 'xxx', 'description' => 'xxx', 'thumbnail' => '', 'version' => '0.1', 'extend' => array( 'oxArticle' => 'xxx/xxx/models/xxx', ), ); 2) Use external payment 3) Look at error log when user is coming back to the shop after successful payment | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | 5.4 | ||||
Database Version | Not defined | ||||
related to | 0001988 | resolved | arvydas_vapsva | Incomplete basket object on shop with same domain |
|
I donĀ“t think that the bug is related to 0001988. The problem is not the cookie content itself. The issue is that the extended class is not included when the shops unserializes the oxbasketitem object. When later the function getArticle() is called oxbasketitem tries to access $this->_oArticle, but this fails with the fatal error because _oArticle is a incomplete class instead of the classtype stored when serializing. I think the bug is more related to 0001746 |
|
Reminder sent to: lygie We weren't able to reproduce this issue with our payment modules. Could you please make the steps to reproduce more specific ? |
|
I try to give some details: We have Oxid 4.9.4 running and (for Example) are using http://exchange.oxid-esales.com/de/tag/sofortueberweisung/Sofortueberweisung-de-0-Stable-CE-4-0-x-4-7-x.html?force_sid=784d8a700eaaf023a7fc639127f5363c as payment. We are using a simple module displaying some special related articles on a pages single view. The module extends oxArticle class using the metadata $aModule = array( 'id' => 'related', 'title' => 'related', 'description' => 'Shows related articles depending on common attribute values and related categories.', 'thumbnail' => '', 'version' => '0.1', 'extend' => array( 'oxArticle' => 'afl/related/models/related', ), ); The class is defined with class Related extends Related_parent{... After paying on the external sofort.com payment page and being returned to our shop, if our module is active the payment process throes a fatal error: PHP message: PHP Fatal error: oxBasketItem::getArticle(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Related" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /data/www/p25/dev.hardcore-filme.tv/htdocs/application/models/oxbasketitem.php on line 436 Disabling the Related Module fixes the error. My understanding is that when oxbasket is unserialized from the Session in oxsession.php 607 the Related class is not yet loaded from the autoload process. We are running php5.4 in a fpm-container. |
|
The Problem occurs when extending 3rd Party Modules. So this isn't technically a bug in eShop. Closed. |