Bug #15290
closedwizard_colorpicker.php doesn't work properly in FlexForms
0%
Description
When using wizard_colorpicker.php in FlexForms, the picked colors are only displayed properly before saving the form. Afterwards, the color always changes to something purple (in IE) or background color (grey, in Firefox). Additionally, IE shows some flickering mousovers when pointing over the colorbox. Firefox shows all of the FlexForm XML in the mouseover.
Snippet from the FlexForm XML:
<fg_color_field_names>
<TCEforms>
<label>LLL:EXT:partner/locallang.php:tx_partner.label.xls.fg_color_field_names</label>
<config>
<type>input</type>
<size>10</size>
<wizards>
<colorpick>
<type>colorbox</type>
<title>LLL:EXT:partner/locallang.php:tx_partner.label.color_picker</title>
<script>wizard_colorpicker.php</script>
<dim>20x20</dim>
<tableStyle>border: solid 1px black; margin-left: 20px;</tableStyle>
<JSopenParams>height=550,width=365,status=0,menubar=0,scrollbars=1</JSopenParams>
<exampleImg>gfx/wizard_colorpickerex.jpg</exampleImg>
</colorpick>
</wizards>
</config>
</TCEforms>
</fg_color_field_names>
(issue imported from #M2052)
Files
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
is it possible for you to locate the problem and write a patch for it?
Greets from Dresden,
Sebastian
Updated by David Bruehlmeier almost 19 years ago
Hi Sebastian
The bug is in class.t3lib_tceforms.php, function renderWizards() on the lines 2997 and 3002 (based on CVS-version 1.66). The color of the colorbox is taken from $row[$field], which is an XML structure if the field is a FlexForm-field. The attached fix changes this and takes the value from $PA['itemFormElValue'] instead, which is the proper value even if it comes from a FlexForm field.
The t3x-file is a small extension which includes two fields with a colorpicker-wizard, one being a regular field and one being an FlexForm-field. That's how I tested the bugfix.
Greetings from snowy Switzerland! :-)
Dave.
Updated by David Bruehlmeier over 18 years ago
Hi,
the problem has not been resolved yet (just tested it with 4.0). I have updated the patch for TCE-forms which is now based on SVN revision 1603 and I have made a small change to the test extension.
Greetings,
Dave.
Updated by Steffen Kamper over 17 years ago
Why is this bugfix not implemented in svn ?
Changing this 2 lines works fine (tested with 4.2dev) !
vg Steffen
Updated by Andreas Otto † over 17 years ago
This bug has been fixed now in SVN in trunk, 4.1 and 4.0.