Bug #64331
closed
TCA slider wizard w. default value in flexform field initializes wrong
Added by d.ros no-lastname-given almost 10 years ago.
Updated about 6 years ago.
Category:
Backend User Interface
Description
If a TCA slider wizard is used in a field with a default value and the field is placed inside a flexform field, the slider is not initialised with the correct value. If the same slider wizard is used on a field that is not inside a flexform field, the slider initialisation works correctly.
Suspected cause is the different nesting and naming that applies when the slider wizard is used inside a nested structure. Potentially also an issue for IRRE fields.
Way to reproduce¶
With ext:flux
If I create a new content object which has some global settings in a sheet generated with a flux:wizard.slider field, I do not see any wizard.slider at all.
If I hit "save" - the slider appears - but without the default value from the input field set
I have to hit "save" once again to get the default value of the input field getting applied to the wizard.slider.
Files
- Target version set to 7.4 (Backend)
- Complexity set to hard
- Status changed from New to Needs Feedback
please recheck with 7.3 as the slider and FormEngine has been reworked.
Don't have a 7.x in usage so far. Perhaps someone else can proof.
- Complexity deleted (
hard)
Hi d.ros, I tested your issue on the current master.
Would you agree to close this ticket, though?
You might laugh. I have no 7. in usage. Just close if it is still valid I'll reopen it one day :-)
- Status changed from Needs Feedback to Closed
I can confirm this issue on TYPO3 CMS 7 and 8 branches (see screenshot).
Default TCA field works, but flexform field fails. Cause default & current value get not inserted correctly in form data.
Can easy be fixed in ../typo3/sysext/backend/Classes/Form/Wizard/ValueSliderWizard.php in line41
Replace
$flexFormValue = $flexFormTools->getArrayValueByPath($params['flexFormPath'], GeneralUtility::xml2array($value));
with
$flexFormValue = $flexFormTools->getArrayValueByPath($params['flexFormPath'], $params['row'][$field]);
I will upload a patch to Gerrit.
To reproduce, i wrote a little test extension (compatibel with CMS 7 and 8) http://enobe.de/test64331_1.0.0.zip
Can someone reopen this issue?
I don't know which target version to set (next patch level?) - should be fixed for 7 and 8.
- Status changed from Closed to In Progress
- Target version changed from 7.4 (Backend) to Candidate for patchlevel
- Status changed from In Progress to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF