No Code Attached Yet bug

Steps to reproduce the issue

  1. Add the following subform to a form:
<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>
  1. Access the form and click + to add a subform item.

Expected result

The subform item is created and added to the subform.

Actual result

The 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.)

System information (as much as possible)

Joomla 5.1.2
PHP 8.3.8

avatar mattelkins-bluefrontier mattelkins-bluefrontier - open - 17 Jul 2024
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jul 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Jul 2024
avatar Fedik Fedik - change - 18 Jul 2024
Labels Added: bug
avatar Fedik Fedik - labeled - 18 Jul 2024
avatar Fedik
Fedik - comment - 18 Jul 2024

For note: the bug caused as result of fixing another bug ?

avatar richard67 richard67 - change - 18 Jul 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-07-18 11:35:33
Closed_By richard67
avatar richard67 richard67 - close - 18 Jul 2024
avatar richard67
richard67 - comment - 18 Jul 2024

Closing as having a pull request. See #43804 .

avatar sakiss
sakiss - comment - 22 Jul 2024

I confirm that as well

Add a Comment

Login with GitHub to post a comment