Bug #91771
closedf:widget.uri does not respect current page type (typeNum) on PageType enhanced URLs
0%
Description
When using f:widget.paginate
on a typeNum > 0 the page links are generated for type = 0 instead if the type is hidden behind a PageType decorated URL.
This is the code for building the link. It's missing the setTargetPageType()
call
return $uriBuilder->reset()
->setArguments([$argumentPrefix => $parameters])
->setSection($arguments['section'])
->setUseCacheHash($arguments['useCacheHash'])
->setAddQueryString(true)
->setAddQueryStringMethod($arguments['addQueryStringMethod'])
->setArgumentsToBeExcludedFromQueryString([$argumentPrefix, 'cHash'])
->setFormat($arguments['format'])
->build();
It works when NOT mapping the type via routing (then it is just a query string and is re-added), but when it is mapped to something fancy via route enhancer it is no query parameter anymore and thus will get ignored.
Updated by S P over 4 years ago
For reference: for the time being, until this bug is fixed, I workaround like this:
Xclass the UriViewHelper
, override getWidgetUri()
and add this in there:
->setTargetPageType($GLOBALS['TSFE']->type)
Works in my case. Not sure if this respects all possible cases one could imagine.
Updated by Christian Kuhn almost 2 years ago
- Related to Task #92529: Remove fluid widgets added
Updated by Christian Kuhn almost 2 years ago
- Status changed from New to Closed
I fear there isn't much we can still do here: The entire widget approach has been deprecated and removed with #92529, so this shouldn't be an issue anymore.