Bug #64331
closedTCA slider wizard w. default value in flexform field initializes wrong
100%
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
Updated by Mathias Schreiber almost 10 years ago
- Target version set to 7.4 (Backend)
- Complexity set to hard
Updated by Benni Mack over 9 years ago
- Status changed from New to Needs Feedback
please recheck with 7.3 as the slider and FormEngine has been reworked.
Updated by d.ros no-lastname-given over 9 years ago
Don't have a 7.x in usage so far. Perhaps someone else can proof.
Updated by Daniel Goerz over 9 years ago
- Complexity deleted (
hard)
Hi d.ros, I tested your issue on the current master.
- In TCA the slider works as intended. With or without a default value.
- In a FlexForm the behavior is the same as in TCA.
- In Flux, besides that this is not part of the core, there just seems to be no support for a default value yet (see: https://fluidtypo3.org/viewhelpers/flux/master/Wizard/SliderViewHelper.html). The Slider itself worked fine for me, too.
Would you agree to close this ticket, though?
Updated by d.ros no-lastname-given over 9 years ago
You might laugh. I have no 7. in usage. Just close if it is still valid I'll reopen it one day :-)
Updated by Daniel Goerz over 9 years ago
- Status changed from Needs Feedback to Closed
Very well then, =)
Updated by Joerg Kummer about 8 years ago
- File issue64331.png issue64331.png added
- TYPO3 Version changed from 6.2 to 7
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.
Updated by Joerg Kummer about 8 years ago
Patch see https://review.typo3.org/#/c/50008/
Updated by Markus Klein about 8 years ago
- Status changed from Closed to In Progress
- Target version changed from 7.4 (Backend) to Candidate for patchlevel
Updated by Gerrit Code Review about 8 years ago
- Status changed from In Progress to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50008
Updated by Gerrit Code Review about 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50047
Updated by Joerg Kummer about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e80121b065a75a83fea0934c26034c9b52df480f.