[BUGFIX] XmlSitemapRenderer should use TSFE->type for page-type 40/58540/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Oct 2018 19:19:36 +0000 (21:19 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 1 Oct 2018 20:02:20 +0000 (22:02 +0200)
When the new PageTypeEnhancer resolved type from a URL it is
not part of getQueryParams() but needs to be fetched from TSFE.

Resolves: #86527
Releases: master
Change-Id: I5041b042f1246f2ecc8adc8fa6cba123abfccf5b
Reviewed-on: https://review.typo3.org/58540
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/seo/Classes/XmlSitemap/XmlSitemapRenderer.php

index 302925a..42d467a 100644 (file)
@@ -61,7 +61,7 @@ class XmlSitemapRenderer
     {
         // Inject request from globals until request will be available to cObj
         $request = $GLOBALS['TYPO3_REQUEST'];
-        $this->view->assign('type', $request->getQueryParams()['type']);
+        $this->view->assign('type', $GLOBALS['TSFE']->type);
         if (!empty($sitemap = $request->getQueryParams()['sitemap'])) {
             return $this->renderSitemap($request, $sitemap);
         }