-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: WidgetFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Summary (*)
Magento
2.2.*, 2.2.5, 2.2.6, 2.2.7
Not possible to use multidimensional arrays in widget parameters
When add custom field set as a block parameter type to widget.xml
Examples (*)
Add custom parameter type (in my case it is an options panel)
Use parameters names and keys like this
parameters[groups_options][order][option[1]: 0
parameters[groups_options][title][option][1][store][0]: store_label_admin
parameters[groups_options][title][option][1][store][1]: store_label_1
parameters[groups_options][title][option][1][store][2]: store_label_2
in this file the code looks like this
magento/vendor/magento/module-widget/Model/Widget/Instance.php:609
if ($name == 'conditions') {
$name = 'conditions_encoded';
$value = $this->conditionsHelper->encode($value);
} elseif (is_array($value)) {
$value = implode(',', $value);
}
It is not really possible to reproduce on vanilla instance but we can try to substitute a request parameters for existing widget fields
Proposed solution
// can't we simply serialize an input here instead of implode it ?
// anyway in the database 'widget_instance' all widget values are included in json
$value = implode(',', $value);
Metadata
Metadata
Assignees
Labels
Component: WidgetFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release