View Issue Details

IDProjectCategoryView StatusLast Update
0006202OXID eShop (all versions)1.03. Basket, checkout processpublic2015-08-10 16:06
Reporterlygie Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Version4.9.4 / 5.2.4 
Summary0006202: unserializeing oxBasket thows fatal error when oxAtricle is exented
DescriptionIf 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 Reproduce1) 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
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP Version5.4
Database VersionNot defined

Relationships

related to 0001988 resolvedarvydas_vapsva Incomplete basket object on shop with same domain 

Activities

lygie

2015-07-23 21:22

reporter   ~0011136

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

QA

2015-07-27 15:29

administrator   ~0011141

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 ?

lygie

2015-07-27 15:50

reporter   ~0011142

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.

QA

2015-08-10 16:06

administrator   ~0011163

The Problem occurs when extending 3rd Party Modules.
So this isn't technically a bug in eShop.
Closed.