Skip to content
Snippets Groups Projects
Commit 90bfb31f authored by Thomas Maroschik's avatar Thomas Maroschik Committed by Morton Jonuschat
Browse files

[BUGFIX] Suggest wizard does not work on new records

The suggest wizard gets it's parameters via a POST json
body. Inside there is the current record uid given,
which follows the scheme "NEW{random number}". For whatever
reason the wizard casts this uid to an integer which results
in a 0. The following check for a numeric uid fails in the
case of a new record, as it is always numeric because of the
cast.

This patch removes the cast. No further sanitizing is necessary
as the uid is casted in every further use case where appropriate.

Resolves: #71056
Releases: master

Change-Id: I1f20fbc32ab406e69596ad8bf7a1e65231b9f1d6
Reviewed-on: https://review.typo3.org/44412


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarGernot Schulmeister <gernotschulmeister@gmx.at>
Tested-by: default avatarGernot Schulmeister <gernotschulmeister@gmx.at>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
parent 115ec06b
No related merge requests found
......@@ -142,7 +142,7 @@ class SuggestWizard
$search = isset($parsedBody['value']) ? $parsedBody['value'] : $queryParams['value'];
$table = isset($parsedBody['table']) ? $parsedBody['table'] : $queryParams['table'];
$field = isset($parsedBody['field']) ? $parsedBody['field'] : $queryParams['field'];
$uid = (int)(isset($parsedBody['uid']) ? $parsedBody['uid'] : $queryParams['uid']);
$uid = isset($parsedBody['uid']) ? $parsedBody['uid'] : $queryParams['uid'];
$pageId = (int)(isset($parsedBody['pid']) ? $parsedBody['pid'] : $queryParams['pid']);
$newRecordRow = isset($parsedBody['newRecordRow']) ? $parsedBody['newRecordRow'] : $queryParams['newRecordRow'];
// If the $uid is numeric, we have an already existing element, so get the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment