What happened?
Description
We have a custom (private) plugin where we use the editableTable form include in the settings, but after upgrading a project to Craft 5 it isn't working properly anymore.
Whenever I press the Add button in console it will show the error Uncaught No disclosure container found.. But when Inspect the HTML I do see a <tr> has been added. If I remove the hidden class from the table it will show up and it is working almost like it should. When I have two rows and delete the last one it removes both rows.
I've tried looking for documentation but I can only find the include. The Craft 5 upgrade guide doesn't give me much to go on either.
Steps to reproduce
Not sure if this is even possible without having the plugin installed.
The code of the _settings.twig page.
{% import "_includes/forms" as forms %}
{% set options = {} %}
{% for section in craft.app.entries.allSections() %}
{% for entryType in craft.app.entries.getEntryTypesBySectionId(section.id) %}
{% set name = section.name %}
{% if section.name != entryType.name %}
{% set name = name ~ ' (' ~ entryType.name ~ ')' %}
{% endif %}
{% set options = options|merge([{ label: name, value: entryType.id }]) %}
{% endfor %}
{% endfor %}
{{ forms.editableTableField({
label: 'Query string params that should be cached as unique pages',
name: 'sectionQueryStringParams',
cols: {
section: {
type: 'select',
heading: 'Section',
options: options
},
queryStringParams: {
type: 'singleline',
heading: 'Query string params',
info: 'Each query string param should be comma separated. E.g. query,sort',
code: true,
},
},
rows: settings.sectionQueryStringParams,
allowAdd: true,
allowDelete: true
}) }}
Expected behavior
Removing the hidden class after adding a row and only removing the row where the remove button is clicked.
Actual behavior
Table stays hidden and deletion of rows is removing more then needed.
Craft CMS version
5.3.2
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- "putyourlightson/craft-blitz": "^5.6"
What happened?
Description
We have a custom (private) plugin where we use the
editableTableform include in the settings, but after upgrading a project to Craft 5 it isn't working properly anymore.Whenever I press the
Addbutton in console it will show the errorUncaught No disclosure container found.. But when Inspect the HTML I do see a<tr>has been added. If I remove thehiddenclass from the table it will show up and it is working almost like it should. When I have two rows and delete the last one it removes both rows.I've tried looking for documentation but I can only find the include. The Craft 5 upgrade guide doesn't give me much to go on either.
Steps to reproduce
Not sure if this is even possible without having the plugin installed.
The code of the
_settings.twigpage.{% import "_includes/forms" as forms %} {% set options = {} %} {% for section in craft.app.entries.allSections() %} {% for entryType in craft.app.entries.getEntryTypesBySectionId(section.id) %} {% set name = section.name %} {% if section.name != entryType.name %} {% set name = name ~ ' (' ~ entryType.name ~ ')' %} {% endif %} {% set options = options|merge([{ label: name, value: entryType.id }]) %} {% endfor %} {% endfor %} {{ forms.editableTableField({ label: 'Query string params that should be cached as unique pages', name: 'sectionQueryStringParams', cols: { section: { type: 'select', heading: 'Section', options: options }, queryStringParams: { type: 'singleline', heading: 'Query string params', info: 'Each query string param should be comma separated. E.g. query,sort', code: true, }, }, rows: settings.sectionQueryStringParams, allowAdd: true, allowDelete: true }) }}Expected behavior
Removing the
hiddenclass after adding a row and only removing the row where the remove button is clicked.Actual behavior
Table stays hidden and deletion of rows is removing more then needed.
Craft CMS version
5.3.2
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions