91548[TASK] Use `UrlFactory` for query generation in AjaxRequest
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Garvin Hicking +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 2
Files 4
Review log 1520
-
Andreas Nedbal uploaded patch set 1 11/11/25, 12:39
-
core-ci voted on patch set 1 V +1 11/11/25, 12:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88993
-
Garvin Hicking commented on patch set 1 CR +1 V +1 11/11/25, 13:05
lgtm :) -
Andreas Nedbal commented on patch set 1 CR -1 11/11/25, 13:12
self-blocking because this is a potential high impact change that requires further reviews -
Andreas Nedbal uploaded patch set 2
CR +1V +111/11/25, 15:02 -
Andreas Nedbal uploaded patch set 3 11/11/25, 15:08
-
core-ci voted on patch set 2 V +1 11/11/25, 15:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89023
-
core-ci voted on patch set 3 V +1 11/11/25, 15:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89026
-
Andreas Nedbal uploaded patch set 4
V +111/11/25, 15:25 -
core-ci voted on patch set 4 V +1 11/11/25, 15:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89030
-
Garvin Hicking voted on patch set 4 CR +1 V +1 11/11/25, 20:58
-
Benjamin Franzke commented on patch set 4 CR -1 11/12/25, 08:37
ajax-request.ts:59This cast hides a real problem, that is otherwise reported by TypeScript: ``` Sources/TypeScript/core/ajax/ajax-request.ts:59:44 - error TS2345: Argument of type 'string | string[] | GenericKeyValue' is not assignable to parameter of type 'URLSearchParamsFeedable'. Type 'string[]' is not assignable to type 'URLSearchParamsFeedable'. Type 'string[]' is not assignable to type 'Record<string, NestedURLSearchParams>'. Index signature for type 'string' is missing in type 'string[]'. 59 data = UrlFactory.createSearchParams(data); ~~~~ ``` This means: That we unsupport passing a plain string to `withQueryArguments`. This should break `Sources/TypeScript/backend/tree/page-browser.ts` which does: ``` request = request.withQueryArguments('alternativeEntryPoints=' + encodeURIComponent(alternativeEntryPoints)); ``` This is a theoretical analysis, I haven't tested yet. But I'll -1 for now -
Andreas Nedbal commented on patch set 4 11/12/25, 08:52
ajax-request.ts:59ReplyThe problem is with string arrays, simple strings do work and are supported by `URLSearchParams`. Inside `UrlFactory.createSearchParams`: ``` if (typeof parameters === 'string') { return new URLSearchParams(parameters); } ``` We could implement support for flat string arrays utilizing a similar method as in InputTransformer, passing them as a string joined by & turns them into separate parameters once handled by `URLSearchParams`. -
Benjamin Franzke uploaded patch set 5
CR +1V +111/12/25, 11:09 -
Benjamin Franzke commented on patch set 5 11/12/25, 11:09
ajax-request.ts:59ReplyImplemented support for string arrays. -
core-ci voted on patch set 5 V +1 11/12/25, 11:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89266
-
Garvin Hicking commented on patch set 5 CR +1 V +1 11/13/25, 11:16
This works for me with the described scenario. I do have one oddity where I enter a URI like: http://example.com/?query="odd" in the link browser popup. That gets stored back as: http://example.com/?query=\"odd\" Saving that will reveal the link again as `"odd"` and only when actively editing it, again showing `\"odd\"`. The frontend output however also strips the escape chars. I think this is beyond the scope of this patch but wanted to write down my finding. -
Benjamin Franzke commented on patch set 5 11/13/25, 11:34
Reply
Ack, came to the same conclusion, see: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91557/comment/75acaf50_10462c05/ -
Benjamin Franzke voted on patch set 5 CR +2 V +2 11/13/25, 11:52
-
Benjamin Franzke merged patch set 6 11/13/25, 11:56