Search code examples
typo3extbasetypo3-9.x

Extbase / type problem after update from TYPO3 7 to TYPO3 9 LTS


I have an old extbase extension that needs to be fixed after updating from 7.6 to TYPO3 9.5.8:

This line seems to be the problem:

$this->registerArgument('background', FileReference::class . '|boolean', 'Image');

The error I get is

The argument "background" was registered with type "TYPO3\CMS\Extbase\Domain\Model\FileReference|boolean", but is of type "TYPO3\CMS\Extbase\Domain\Model\FileReference" in view helper

However, if I remove the |boolean I get a new error, this time

The argument "background" was registered with type "TYPO3\CMS\Extbase\Domain\Model\FileReference", but is of type "boolean" in view helper

So I am kind of in a loop here. Any ideas?


Solution

  • I was able to solve the issue by turning the type to "string". Still not sure why It sent me in a loop before...