User tests: Successful: Unsuccessful:
Pull Request for Issue #43800.
Updated subform JavaScript behaviours to look for .switcher when .radio is not found.
<field
name="switcher_test_subform"
type="subform"
label="Switcher Test"
multiple="true"
layout="joomla.form.field.subform.repeatable">
<form>
<fieldset>
<field
name="switcher_test"
type="radio"
label="Switcher Test"
layout="joomla.form.field.radio.switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
</form>
</field>
A subform item is created and added to the subform, but the following JavaScript error occurs, which interferes with any other JavaScript attempting to run.
TypeError: Cannot read properties of null (reading 'nodeName')
at joomla-field-subform.js?25ff4b:305:31
at Array.forEach (<anonymous>)
at JoomlaFieldSubform.fixUniqueAttributes (joomla-field-subform.js?25ff4b:263:14)
at JoomlaFieldSubform.addRow (joomla-field-subform.js?25ff4b:195:10)
at JoomlaFieldSubform.<anonymous> (joomla-field-subform.js?25ff4b:95:16)
(Error trace taken with debug mode enabled.)
A subform item is created and added to the subform without any JavaScript errors occurring.
No documentation changes for docs.joomla.org needed.
No documentation changes for manual.joomla.org needed.
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
Labels |
Added:
bug
PR-5.1-dev
|
Category | Layout | ⇒ | JavaScript Repository NPM Change |
Thanks, yes that will work.
However I think it still not very reliable solution, when markup/class will changes at some point.
What we need: is to pick closest fieldset, that direct parent of the radio/checkbox inputs (fieldset>input or fieldset>div>input), but ignore any other parent fieldsets.
hmhm, I will look later, in detail.
Labels |
Added:
NPM Resource Changed
|
I have tested this item ✅ successfully on c2802cf
I have tested this item ✅ successfully on c2802cf
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-08-10 09:41:31 |
Closed_By | ⇒ | bembelimen |
Thx
There need to fix JS.
Adding this class can break some styling for templates that have some css for
.radio