User tests: Successful: Unsuccessful:
When you add a hidden field to the search filters you will see an error message in the console and the searchtools like:
Uncaught TypeError: element.labels is null
activeFilter http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:330
checkFilter http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:222
Searchtools http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:167
Searchtools http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:166
onBoot http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:542
EventListener.handleEvent* http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:563
<anonymous> http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:564
searchtools.js:330:13
This is caused by a hidden field in the filter_VIEW.xml file. This field has no label field and is not required according to the documentation at https://docs.joomla.org/Hidden_form_field_type
administrator/components/com_content/forms/filter_articles.xml
<field
name="search_id"
type="hidden"
default="abc"
/>
npm run build:js
An error is shown in the console
Uncaught TypeError: element.labels is null
activeFilter http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:330
checkFilter http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:222
Searchtools http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:167
Searchtools http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:166
onBoot http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:542
EventListener.handleEvent* http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:563
<anonymous> http://joomlacms.test/media/system/js/searchtools.js?7039b530192126304eb4d7e43f009e45:564
searchtools.js:330:13
There are no errors in the console.
None
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change |
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-02-25 17:02:43 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
I have tested this item✅ successfully on 74f0d35
Works as described.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32511.