Project

General

Profile

Actions

Bug #90239

closed

ORM in Extbase broken for ObjectStorage

Added by Torben Hansen almost 5 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-01-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When adding v10 compatibility to an Extbase extension, I'm currently struggling with the following error message:

Cannot create empty instance of the class "TYPO3\CMS\Extbase\Persistence\ObjectStorage" because it does not implement the TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface.

The error occurs in the current TYPO3 master, as soon as getters/setters for ObjectStorage properties are added to a domain model. I tried several different annotations for the ObjectStorage property, but all result in different error messages (mostly in relation to ObjectStorage as shown in the example below)

"\TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>" is not a valid Fqsen.

I created a very simple test extension to reproduce the problem: https://github.com/derhansen/extbase_test

How to reproduce:
  • Install extension
  • Create a record of type "test" on a page (Add title and select at least one category)
  • Add plugin to page and select storage page where record was created
  • Error message is shown in FE when page with plugin is called
Actions #1

Updated by Torben Hansen almost 5 years ago

It seems I was just too tired and forgot to update composer dependencies of my local TYPO3 master... doh!

Please close this ticket.

Actions #2

Updated by Georg Ringer almost 5 years ago

  • Status changed from New to Closed

closed as requested

Actions #3

Updated by Nikita Hovratov 12 months ago

If someone should stumble across this as me: I migrated a classic mode v10 project to composer and got this error.
You should perform composer update --prefer-lowest here, so you get the exact same vendor versions as the packaged classic mode TYPO3.
Seems there is some package, which I couldn't pin down, that broke in a newer version.

Actions

Also available in: Atom PDF