Bug #91989
closedResolving of PHP based Views not possible anymore
0%
Description
I have an extension that renders a Json response via the format-parameter.
In TYPO3 9, the View resolved to the JsonView automatically in ActionController:resolveViewObjectName(), but this logic vanished with TYPO3 10 and the GenericViewResolver does not resolve to anything useful but a default View object.
https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php#L455
https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php#L528
Updated by Markus Klein over 1 year ago
- Status changed from New to Closed
This is a documented breaking change:
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/10.0/Breaking-87511-RemoveViewFormatToObjectNameMapProperty.html?highlight=87511
You may use the initialize*Action()
method to defined any view with the defaultViewObject
depending on whatever criteria you consider useful.
On top you can also implement your own ViewResolver, which get the current format
too.
https://review.typo3.org/c/Packages/TYPO3.CMS/+/64017/3/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php#404