0

I'm using TYPO3\CMS\Core\Cache\Frontend\VariableFrontend in TYPO3 CMS v12 as cache for custom created database records. While caching these records they get serialized() and afterwards when fetching from cache unserialized().

Some record with an IRRE property of type ObjectStorage<Category> (sys_category) must contain an invalid value because this error is thrown only for a single record:

Cannot assign null to property TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject::$_cleanProperties of type array 

at unserialize()
in /var/www/html/vendor/typo3/cms-core/Classes/Cache/Frontend/VariableFrontend.php line 85

The relations in the database are looking good and when removing the property from the PHP model everything works fine.

Debugging serialization/unserialization of records is very long-winded even with Xdebug.

How can I debug setting the $_cleanProperties in TYPO3 CMS when unserialize PHP objects?

Thanks in advance!

Limit possible records and properties to only identify causing record and property.

I expect to set records into cache and fetching them usable again.

1
  • The issue is probably going to be in how the parents context is being re-initialized but that's just a guess. It appears that VariableFrontend is inheriting from AbstractDomainObject. The $_cleanProperties is possibly being overlooked when the instance is initialized with the cached data. Php will call magic methods that you should implement that will govern how the instance will consume the data being passed to it to initialize it. This might help wiki.php.net/rfc/custom_object_serialization Commented May 13 at 14:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.