Closed thomaszbz closed 7 years ago
Implemented it according to this example: https://werkraum.net/devblog/detail/article/backend-routes-ajax-typo3-76/
Thereby moving registration of the Ajax controllers to <extension>/Configuration/Backend/AjaxRoutes.php
.
Just by changing the way Ajax controllers get registered, I had to use ServerRequestInterface
and ResponseInterface
. Otherwise, it did not work any more.
Javascript stayed untouched.
Using the ResponseInterface
, a typical AJAX response in metaseo looks like this:
That said, the payload is in the body of the http response and not in the header (thereby not breaking obscure caching infrastructure by exceeding maximal header length as it was the case in #233).
Using the ResponseInterface
, Content-Type: "application/json; charset=utf-8"
and X-JSON: "true"
are automatically set by the response object.
MetaSEO version: 3.0.0-dev TYPO3 version: 8.7.0 PHP version: 7.0.16
How to reproduce:
Deprecation log:
10-04-17 07:34: TYPO3\CMS\Backend\Utility\BackendUtility::getAjaxUrl() - since TYPO3 v8, will be removed in TYPO3 v9, use the UriBuilder directly.
Migration:
Related:
147 (could not do this earlier because of 6.2)