Bug #67794
closedWrong validation of select fields in Backend
100%
Description
After I updated my typo3 to 7.4-dev I can't choose the Backend layout field anymore.
I still can select the entries with id 0 and 1, but not anything above uid 1, it will prevent the form from saving.
I tracked the issue down to here: typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js Line 91.
It will check minItems and maxItems and validate it against the item uid instead of the item count.
I solved it on my plattform with replacing
if (selected < rule.minItems || selected > rule.maxItems) {
with
if (selected.length < rule.minItems || selected.length > rule.maxItems) {
This was introduced on 3. May with 74d875c4fb3044ceff98549b8014391bc37506dd
Updated by Silvia Bigler over 9 years ago
I just discovered that my original change was just rubbish -.-
Something like
var selected = $field.find('option:selected').length;
if (selected < rule.minItems || selected > rule.maxItems) {
should be better. But I doubt that this would also work for the range fields, because they are handled with the same code.
Updated by Frank Nägler over 9 years ago
- Status changed from New to Needs Feedback
- Assignee set to Frank Nägler
- Target version set to 7.4 (Backend)
- Sprint Focus set to Remote Sprint
Can't reproduce the problem. Can you give me some more information about your System? Browser and Version?
Updated by Frank Nägler over 9 years ago
- Status changed from Needs Feedback to Accepted
ok, get the problem. I will take care of a patch
Updated by Gerrit Code Review over 9 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40703
Updated by Silvia Bigler over 9 years ago
Thanks for this very fast reaction! Nice Work!
Updated by Frank Nägler over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9198602bf7ef07b2f30089885a20ef8f090ffaac.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed