Bug #88125
closedHttpUtility::buildQueryString doesn't seem to be proper for additionalParams
0%
Description
AbstractPlugin->pi_linkTP() is using the Method HttpUtility::buildQueryString for rendering additionalParams.
This causes a bug, additionalParams won't rendered any longer.
HttpUtility::buildQueryString returns for example: &%5Btx_xblog_pi1%5Bplugin%5D%5D=732
But the proper rezurn must be for example: &tx_xblog_pi1[plugin]=732
If you replace HttpUtility::buildQueryString( $urlParameters, '&', true ) with GeneralUtility::implodeArrayForUrl( '', $urlParameters, '', true ) everything runs fine.
TYPO3 8.7 has used GeneralUtility::implodeArrayForUrl.
class: TYPO3\CMS\Frontend\Plugin\AbstractPlugin
function: pi_linkTP($str, $urlParameters = [], $cache = false, $altPageId = 0)
Kind regards
Dirk
Updated by Susanne Moog over 5 years ago
- Status changed from New to Needs Feedback
Thanks for the report, can you give us a bit more information:
What does the $urlParameters array look like in both cases?
The problem with your example is that &%5Btx_xblog_pi1%5Bplugin%5D%5D=732 would be decoded to &[tx_xblog_pi1[plugin]]=732 which is one nesting level too many. The result should be &tx_blog_pi1%5Bplugin%5D=732 instead (it's fine and expected that the brackets are encoded). I just tested with an example array of ['tx_blog_pi1' => ['plugin' => 732]] with both methods and cannot reproduce your nesting error - it's working fine in my case. Please provide a test case with the input you are using.
Updated by Dirk Wildt over 5 years ago
Very, very strange: TYPO3 9.5 behaves with me now as with you. The error is gone and thus fixed :) Sorry for the circumstances.
Updated by Georg Ringer over 5 years ago
- Status changed from Needs Feedback to Closed
I am closing the issue as it seems to be fine now