Issue Bug Closed

#102972Rendering Option addQueryString not working in form framework

Mathias Blasek 01/29/24, 07:44 updated 03/31/26, 09:00

Description

In Typo3 v12, I configured a form with addQueryString in the rendering Options. Before migrating, the form had the expected behaviour (get-Parameter add to the action url of form).

I debugged it and asserted that the call of UriBuilder returned the correct configuration which called the method createUrl of the class ContentObjectRenderer. There was a call for creating a link-object in the LinkFactory. However the factory made a call to PageLinkBuilder. I pointed out that the method generateUrlForPageWithSiteConfiguration didn’t get the query-parameters of the request. The array queryParameters didn’t contain the affected get-parameters.
So, the in the action of the form I’m missing the expected get-parameter of the previous request.

For reproducing create a form by using a yaml-configuration and call the page with one or more get-parameter.

Reviews 3

History 37

  1. Josua Vogel commented <span data-processor="relativetime" data-value="2026-03-06T12:01:15+00:00" > 03/06/26, 12:01 </span>

    Hi,

    you have to set addQueryString to untrusted – this was a breaking change of v12: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-98488-TypolinkOptionAddQueryStringOnlyIncludesResolvedQueryArguments.html

    I pushed a fix for the form docs to reflect this behaviour.

  2. Josua Vogel commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-03-06T13:35:09+00:00" > 03/06/26, 13:35 </span>

    Applied in changeset commit:afcccb10df383566398ca33900e29e402642acce.