Review main Merged

97757[BUGFIX] Keep listed body parameters on edit redirect

Benjamin Kott CR +2 V +2 Normal +58 −0 updated 11/18/26, 04:37

Commit message

A POST to record_edit always redirects to the form. Since #94114 the
redirect URL is built from the query parameters plus edit and
returnUrl, so columnsOnly, defVals, overrideVals and returnEditConf
sent in the body were lost, although the controller reads them from
the body as well. These four are now kept, from a fixed list; a value
of the body wins over the query, as it does when the controller reads
it. Any other parameter of the body stays out of the URL.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 810

  1. Benjamin Kott uploaded patch set 1 11/17/26, 16:42

  2. core-ci voted on patch set 1 V +1 11/17/26, 16:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114763

  3. Oli Bartsch commented on patch set 1 11/17/26, 17:35

    This is not quite accurate. It changed the `RouteRedirect` allow list in `Routes.php` for token-less GET URLs, not the post/redirect/get in `mainAction()`. The body never kept params. The cause is the POST redirect built from query params in #94114.

    EditDocumentController.php:103

    This duplicates the list already used in `compileStoreData()`.

    EditDocumentControllerTest.php:344

    `assertStringContainsString` on the decoded `Location` header is weake. Could we use `parse_str(parse_url(..., PHP_URL_QUERY))` with `assertSame` against the posted array, and add a case with the same key in query and body to pin precedence?
  4. Benjamin Kott uploaded patch set 2 V +1 11/17/26, 18:16

  5. Benjamin Kott commented on patch set 1 11/17/26, 18:16

    Reply

    Right, #105717 only touched the `RouteRedirect` list in `Routes.php`. The redirect comes from #94114. Message now says so, `Related: #94114` instead of #105717.

    EditDocumentController.php:103 Reply

    `compileStoreData()` has no caller since 94865e1b0e3 (opendocs), and its list differs (`edit`, no `returnEditConf`). Kept separate; removing the dead method is a task of its own, not for a 14.3 bugfix.

    EditDocumentControllerTest.php:344 Reply

    Done: `parse_str(parse_url(...))` with `assertSame`, plus a body-over-query case per parameter. Negative test uses `assertArrayNotHasKey`.
  6. Benjamin Kott commented on patch set 2 11/17/26, 18:18

    Reply

    Done
  7. core-ci voted on patch set 2 V +1 11/17/26, 18:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114774

  8. Oli Bartsch commented on patch set 2 CR +1 V +1 11/17/26, 20:55

    EditDocumentController.php:103 Reply

    Acknowledged
  9. Benjamin Kott voted on patch set 2 CR +2 V +2 11/18/26, 04:04

  10. Benjamin Kott merged patch set 3 11/18/26, 04:37