#111478EditDocumentController drops parameters of a POST body in its redirect
Description
Problem
EditDocumentController reads edit, columnsOnly, defVals, overrideVals, returnEditConf and returnUrl from the body of a request as well as from its query. A POST request always ends in a redirect to the form (post/redirect/get), and that redirect keeps only edit and returnUrl of the body. columnsOnly, defVals, overrideVals and returnEditConf sent in the body are lost: the form shows all fields instead of the selected ones, a new record gets no default values, and the outer wizard gets no returnEditConf.
The core itself sends these parameters in the query; an extension or a custom form that posts them to record_edit is affected.
Related to #105717, which kept columnsOnly in the redirect of shareable links.
Steps to reproduce
- POST to the route
record_editwith the bodyedit[pages][1]=editandcolumnsOnly[pages][0]=title. - Follow the redirect: its URL carries
edit, but notcolumnsOnly, and the form shows every field of the page.
Cause
EditDocumentController::mainAction() builds the redirect URL from the query parameters and adds edit and returnUrl only.
Suggested fix
Keep a fixed list of parameters of the body in the redirect: the ones the controller already reads from it besides edit and returnUrl, that is columnsOnly, defVals, overrideVals and returnEditConf. Any other parameter of the body stays out of the URL.
Reviews 2
History 15
-
Gerrit Code Review pushed patch set 1 for main to change 97757 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-17T16:42:50+00:00" > 11/17/26, 16:42 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97757 <span data-processor="relativetime" data-value="2026-11-17T18:16:11+00:00" > 11/17/26, 18:16 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97773 <span data-processor="relativetime" data-value="2026-11-18T03:59:42+00:00" > 11/18/26, 03:59 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 97773 <span data-processor="relativetime" data-value="2026-11-18T04:19:56+00:00" > 11/18/26, 04:19 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-18T04:40:21+00:00" > 11/18/26, 04:40 </span>
Applied in changeset commit:f75db6e8b1001a65af2e3087827847b4fafb2fd1.