Project

General

Profile

Actions

Bug #91989

closed

Resolving of PHP based Views not possible anymore

Added by Kevin Ditscheid over 3 years ago. Updated 11 months ago.

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

0%

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

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

Actions #1

Updated by Markus Klein 11 months 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

Actions

Also available in: Atom PDF