Bug #71056

Suggest Wizard do not work on new records

Added by Alexander Grein over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2015-10-26
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If adding e.g. a news plugin on a page and click on the suggest wizard of the storage page a error 500 will be thrown.

The problem is somewhere in typo3/sysext/backend/Classes/Form/Wizard/SuggestWizard.php inside the searchAction method.

Just doing this:

$uid = (int)(isset($parsedBody['uid']) ? $parsedBody['uid'] : $queryParams['uid']);

,I thing is not such a good idea, because in case of a new record $parsedBody['uid'] contains a string like "NEW12345", which will result in a wrong uid if force it to an int.

Associated revisions

Revision 90bfb31f (diff)
Added by Thomas Maroschik over 3 years ago

[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: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Gernot Schulmeister <>
Tested-by: Gernot Schulmeister <>
Reviewed-by: Morton Jonuschat <>
Tested-by: Morton Jonuschat <>

History

#1 Updated by Mathias Schreiber over 3 years ago

  • Category changed from Backend User Interface to FormEngine aka TCEforms

#2 Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44412

#3 Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44412

#4 Updated by Thomas Maroschik over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#5 Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF