Bug #45384

Persisted entity object in widget-configuration cannot be deserialized (after reload)

Added by Benno Weinzierl over 8 years ago. Updated about 8 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Widgets
Start date:
2013-02-11
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

I have a widget with a persisted entity object (e.g. MyNamespace\SpecialProduct derived from MyNamespace\Product) in its widget-configuration.

The object gets serialized in the session and is accessable in a ajax-request (everything works).

BUT:
When i reload the page with the widget, the ajax calls fail with the following error:

Fatal error: ... The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "MyEntity" 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 "my widget ajax action controller" on line 65

I noticed that in Data/Temporary/Development/SubContextMyContext/Cache/Data/Flow_Session_Storage the entity is serialized. After reload the file contains the serialized entity two times. That seemes strange.

Also available in: Atom PDF