The subpalette toggler cannot be saved
qzminski opened this issue · 2 comments
qzminski commented
I have a gallery custom content element that has a dropdown field where you can select whether the source would be:
- a folder (option
folder
) – the file picker appears; - a list of images (option
manual
) – RSCE list with custom fields.
These are the workflow steps to reproduce:
- Create a new element.
- The
folder
option is selected. - Choose the
manual
option and save the record. - Choose the
folder
option back and save the record – this does not work, the field is not updated andmanual
option remains.
If the record is saved with a certain dropdown option (i.e. manual
) that toggles the RSCE list with custom fields, then you can no longer choose and save any other option (i.e. folder
).
It seems that it used to work, but I don't know which versions could change the behavior.
<?php
return [
'label' => ['Gallery'],
'types' => ['content'],
'contentCategory' => 'media',
'standardFields' => ['headline', 'cssID'],
'fields' => [
'sourceType' => [
'label' => [
'en' => ['Source type', 'Here you can choose the source type.'],
],
'inputType' => 'select',
'options' => [
'folder' => 'Folder selection',
'manual' => 'Manual selection',
],
],
'sourceFolder' => [
'label' => ['Images source folder', 'Please choose the images source folder.'],
'inputType' => 'fileTree',
'eval' => ['fieldType' => 'radio', 'tl_class' => 'clr'],
'dependsOn' => ['field' => 'sourceType', 'value' => 'folder'],
],
'images' => [
'dependsOn' => ['field' => 'sourceType', 'value' => 'manual'],
'label' => [
'en' => ['Images'],
],
'elementLabel' => [
'en' => '%s. Image',
],
'inputType' => 'list',
'fields' => [
'image_url' => [
'label' => [
'en' => ['Image url', 'Please enter the image URL.'],
],
'inputType' => 'text',
'eval' => ['tl_class' => 'clr'],
],
],
],
],
];
ausi commented
Should be fixed now in version 2.4.2.
qzminski commented
Works like a charm! Thank you!