http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692008-01-23T08:59:06ZTYPO3 ForgeTYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468562008-01-23T08:59:06ZRobert Destigterrjdestigter@hotmail.com
<ul></ul><p>Sorry, I accidently submitted before thinking of a good subject. Severity also should be set to major. Could some admin please change this for me?</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468582008-01-30T10:31:25ZRobert Destigterrjdestigter@hotmail.com
<ul></ul><p>So far I have been able to debug it back to the function "renderRecord_selectProc" of the class "t3lib_transferData"</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468572008-01-30T11:07:51ZRobert Destigterrjdestigter@hotmail.com
<ul></ul><p>The problem has to do with the function "renderRecord_selectProc" of the class "t3lib_transferData".</p>
<p>Because the items array of the field is declared with XML and not set as an empty array by php the function bypasses the step where it loops through the variable $elements.</p>
<p>I solved it with a workaround by changing "<items></items>" into:</p>
<p><items><br /> <item><br /> <numIndex index="0"></numIndex><br /> </item><br /></items></p>
<p>What is the correct way for this?</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468592008-01-30T19:31:03ZOliver Haderoliver.hader@typo3.org
<ul></ul><p>Changed the subject of this issue. It's not a major one.<br />Thanks for tracking down the origin. This would also mean, that an empty items array in regular TCA context produces this behaviour, wouldn't it?</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468602008-01-31T02:04:16ZSteffen Kamperinfo@sk-typo3.de
<ul></ul><p>remove <items></items> or if you need an empty item at the beginning use<br /><items><br /> <numIndex index="0" type="array"><br /> <numIndex index="0"></numIndex><br /> <numIndex index="1"></numIndex><br /> </numIndex><br /></items></p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468612008-02-04T08:52:37ZRobert Destigterrjdestigter@hotmail.com
<ul></ul><p>@Steffen<br />Thanks for the info. It worked.</p>
<p>@Oliver<br />That is correct. I tested the configuration for a regular TCA field defined in PHP. If the index "items" is not declared or if it is not declared as an array, the selected values are submitted to the database, but not displayed as selected after saving or editing the record.</p>
<p>I also tested it in combination with a "foreign_table" configuration. In that case the selected records are displayed as selected, but the selected dynamic options added with "itemsProcFunc" are not.</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468622008-02-04T09:00:53ZRobert Destigterrjdestigter@hotmail.com
<ul></ul><p>The renderMode configuration does not have influence on this issue.</p>
<p>My conclusion is: If the "items" index is not an array, selected values added with itemsProcFunc are submitted to the database, but not displayed as selected in the form.</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468632008-02-04T13:04:14ZStefan Geithtypo3dev2014@geithware.de
<ul></ul><p>I think, the same behaviour can be seen in tt_news:</p>
<p>When you place the tt_news plugin, you can select a category form the recursive category-tree via 'Category selection' :<br />but when you re-edit the record, the selection is gone.</p>
<p>If you select 'Special options: [not categorized]' (what is defined in the flexforms items-array) it apears correctly on re-editing.</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468642008-10-09T16:07:31ZNetresearch DTT GmbHtypo3@netresearch.de
<ul></ul><p>The problem lies in class.t3lib_transferdata.php:423(function renderRecord_selectProc)</p>
<pre><code>// Add regular elements:<br /> if (is_array($fieldConfig['config']['items'])) {<br /> $fieldConfig['config']['items'] = $this->procesItemArray($fieldConfig['config']['items'], $fieldConfig['config'], $TSconfig[$field], $table, $row, $field);<br /> foreach($fieldConfig['config']['items'] as $pvpv) {</code></pre>
<p>That means only if an item array exists, the dynamic items from itemProcFunction will be added. But that way is false.</p>
<p>A Workaround for that is:</p>
<p><config type="array"><br /> <type>select</type><br /> <items type="array"><br /> </items><br /><itemsProcFunc>fileadmin/classes/class.myclassfile.php:user_myfunction-><br />myItems</itemsProcFunc><br /> <size>10</size><br /> <maxitems>100</maxitems><br /> </config></p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468652008-10-09T16:10:36ZNetresearch DTT GmbHtypo3@netresearch.de
<ul></ul><p>The patch is against Typo3 4.2.1</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=468662010-01-25T09:48:41ZChristian Weiske
<ul></ul><p>Could someone apply this patch to 4.2.x and check if that is still relevant for 4.3? This is a really, really annoying problem.</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=851522011-09-05T00:08:53ZAndreas Wolfandreas.wolf@typo3.org
<ul><li><strong>Category</strong> set to <i>FormEngine aka TCEforms</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Needs Feedback</i></li><li><strong>Target version</strong> deleted (<del><i>0</i></del>)</li><li><strong>Complexity</strong> set to <i>easy</i></li></ul><p>Could anyone provide a test extension for that? And test if that's still relevant in 4.5/4.6?</p> TYPO3 Core - Bug #18042: Selected value of select field not shown in TCEformshttp://forge.typo3.org/issues/18042?journal_id=1620612013-05-01T13:48:09ZAlexander Opitzopitz.alexander@googlemail.com
<ul><li><strong>Status</strong> changed from <i>Needs Feedback</i> to <i>Closed</i></li></ul><p>No response over one year => closed.</p>