Note: the problem can be reproduced only if a template has subforms in its templateDetails.xml, and you try to modify/save template parameters. So, I've provided a very minimalistic template (no front-end fancyness) to demonstrate the issue. Use that for testing.
Apche 2.4.46
PHP 8.03
MySQL 5.6.17
Joomla! 4.03
Labels |
Added:
No Code Attached Yet
|
I can confirm,
it worked in past somehow :)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-10-02 13:40:25 |
Closed_By | ⇒ | Fedik |
Hi Fedik,
I can confirm that #35726 solves the duplication of subforms when saved, but it breaks showon functionality now.
Add a second field to the (child) subform with showon condition, which refers to the 1st field of this (child) subform. Condition: showon="first_field!:" (ie. if 1st field empty, 2nd field shouldn't appear).
Using your commit/modifications, as soon as I've added the 2nd (child) subform, ALL fields appeared in this form, ignoring the showon condition of the 2nd field.
Attached a modified test_2 template, where I've added a 2nd field into the (child) subform with showon condition.
Test your commit with this XML now, you'll see what I've described above.
test_2.zip
Also noticed: if a field with showon condition displayed while it shouldn't, and this field is a radio button group (the fancy one), then these buttons are not clickable. I guess, this is a side effect of JS implementation of "showon".
I've also replicated this problem with Joomla 4.0.3, used inside a config.xml