Bug #94244
openPageTypeSuffix Enhancer buggy
0%
Description
If I use PageTypeSuffix enhancer the type parameter in an url is not always respected even if it is defined. This is why ext media_upload does not work again. I I remove the PageTypeSuffix enhancer the type parameter works without problems.
Example:
Works: https://www.oth-aw.de/studieren-und-leben/campusleben/marktplatz/biete-suche/mediaupload.html
Doesn’t work: https://www.oth-aw.de/studieren-und-leben/campusleben/marktplatz/biete-suche/?type=1386871773
On the root page it works:
https://www.oth-aw.de/?type=1386871773
Config:
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
...
mediaupload.html: 1386871773
mediadelete.html: 1386871774
If it is solved I would remove the urls in this issue.
Updated by Bernhard Eckl over 3 years ago
- Related to Bug #86835: Static route sitemap.xml is still not working on single-page tree added
Updated by Bernhard Eckl over 3 years ago
- Related to Bug #87104: PageTypeSuffix removes type parameter for non mapped type values added
Updated by Riccardo De Contardi over 3 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Annett Jähnichen over 3 years ago
Seems still relevant in TYPO3 v9.5.27
Tested with TYPO3 9.5.27
PHP 7.4
and site config
routeEnhancers:
PageTypeSuffix:
type: PageType
what have I done?¶
Configured a PageType in TypoScript to use a different view and other settings. For example generate a xml view of a news page or prevent JavaScript and CSS files from being loaded on certain pages or use AjaxReuests.
Do not map the PageTyp in site config.
what did I expect?¶
A certain page https://example.org/foo/?type=1 would be rendered with the page config of typeNum = 1.
what happened?¶
The page is rendered with the configuration of default page setup. Looks different.
technical remarks¶
especially <f:link.page pageUid="{currentUid}" pageType="1"> an <f:uri.page pageUid="{currentUid}" pageType="1"> loaded only the page with default configuration. I guess f:link.action does it the some way.
https://example.org/?uid=x&type=1 would work, but that is not the output of the mentioned ViewHelper
Updated by Christian Weiske about 2 years ago
The problem is that the default suffix "/" automatically sets the page type to 0.
When calling "https://example.org/foo?type=1" (without the trailing slash) the type is correctly set.
(Removing the mapping from '"/": 0' does not fix this!
I still think it would be very beneficial to be able to override the page type with the "?page" GET parameter, because that makes it easier to build Ajax URLs from the current URL.
This problem exists here on TYPO3 10.4.22.
Updated by Oliver Hader about 2 years ago
- TYPO3 Version changed from 9 to 10
- Sprint Focus set to On Location Sprint
Updated by Bernhard Eckl over 1 year ago
- TYPO3 Version changed from 10 to 11
- PHP Version changed from 7.3 to 8.2
Problem still exists on TYPO3 11. Currently using PHP 8.2.