Project

General

Profile

Actions

Bug #43893

closed

selected = 1 doesn't work in class.tslib_content_form.php

Added by Thorsten Menkenhagen over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2012-12-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

When I change

$selected = isset($singleKeyArray['selected.'])
? $this->cObj->stdWrap($singleKeyArray['selected'], $singleKeyArray['selected.'])
: $singleKeyArray['selected'];

in Line 107 to

$selected = isset($singleKey_valueArray['selected.'])
? $this->cObj->stdWrap($singleKey_valueArray['selected'], $singleKey_valueArray['selected.'])
: $singleKey_valueArray['selected'];

then everything is okay.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #47484: selected option not respected in sysext frontend -> FormContentObjectRejected2013-04-23

Actions
Actions #1

Updated by Peter Schuster over 11 years ago

I can confirm this. The same problem exists in TYPO3 v4.7.
The suggested fix works for me, too.

Actions #2

Updated by Tobias Liebig over 11 years ago

Could you provide a more detailed description how to test/reproduce this?

I guess it also occurs in 6.0, even if the code looks completely different there

Actions #3

Updated by Tobias Liebig over 11 years ago

Test TypoScript:

page = PAGE

temp.mailform = FORM
temp.mailform {
  dataArray {
    20.label = Foobar
    20.type = test=select
    20.valueArray {
      10.label = Blue
      10.value = 1
      20.label = Red
      20.value = 2
      20.selected = 1
    }
  }
  recipient = info@example.com
  layout = <div class="some-class">###LABEL### ###FIELD###</div>
}

page.10 < temp.mailform
Actions #4

Updated by Tobias Liebig over 11 years ago

  • Complexity set to easy

I can confirm this still happens in 6.0, although the TYPO3\CMS\Frontend\ContentObject\FormContentObject seems not to be used at all if the new EXT:form is installed.

However, the suggested fix makes sense and is pretty easy to implement.

Actions #5

Updated by Gerrit Code Review almost 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20282

Actions #6

Updated by Gerrit Code Review almost 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20282

Actions #7

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22751

Actions #8

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22752

Actions #9

Updated by Wouter Wolters over 10 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF