Code of Conduct
Is there an existing issue for this?
GLPI Version
11.0.8
Plugin version
2.14.6
Bug description
On the Project Kanban, filtering by the tag: search term (added by the Tag plugin via Hooks::KANBAN_FILTERS) does not work. Other built-in filters (e.g. user:, team:) work correctly on the same board.
When interacting with an already-entered tag: filter term in the search box (e.g. clicking on it to edit), the browser console shows:
Uncaught TypeError: Cannot read properties of undefined (reading 'raw')
at SearchInput.makeTagEditable (SearchInput.js:497:1)
at HTMLSpanElement. (SearchInput.js:358:1)
at HTMLDivElement.dispatch (base.min.js:156:41760)
at HTMLDivElement. (base.min.js:156:39643)
This appears to happen because SearchInput.makeTagEditable expects a matching suggestion object (with a .raw property) from a predefined list of values for the tag, but the tag filter registered by the Tag plugin is a free-text filter with no predefined values list — so the lookup returns undefined and the subsequent .raw access throws. After this error, the Kanban's filtering JS appears to break entirely and the filter is never applied to the displayed cards.
This looks related to a previously reported GLPI core issue (glpi-project/glpi#13593), where the same SearchInput.js code path failed for the type: filter on 10.0.5 for a similar reason (missing suggestion data). It seems to now affect the Tag plugin's tag:/tagged: filters on GLPI 11.0.8.
Relevant log output
Page URL
No response
Steps To reproduce
- Install/enable Tag plugin 2.14.6 on GLPI 11.0.8.
- Tag at least one Project.
- Open the global Project Kanban.
- Type tag: into the search box and press Enter.
- Click on the resulting filter term in the search box to edit it (or simply observe that no filtering is applied to the cards).
- Check browser console — the TypeError above appears.
Expected behavior:
The tag: filter should actually filter the visible Project cards by tag, and clicking to edit an existing filter term should not throw a JS error.
Actual behavior:
No filtering occurs on the cards, and a JS TypeError is thrown in the console, which appears to break further Kanban filter interactions.
Your GLPI setup information
No response
Anything else?
- Other Kanban filters (
user:, team:) work fine on the same board.
- Plugin's setup.php registers the filters as:
$common_kanban_filters = [
'tag' => [
'description' => _x('filters', 'If the item has a tag', 'tag'),
'supported_prefixes' => ['!'],
],
'tagged' => [
'description' => _x('filters', 'If the item is tagged', 'tag'),
'supported_prefixes' => ['!'],
],
];
No values (suggestion list) is provided for the tag filter, which may be what triggers the core JS bug when the term is rendered/edited.
Code of Conduct
Is there an existing issue for this?
GLPI Version
11.0.8
Plugin version
2.14.6
Bug description
On the Project Kanban, filtering by the tag: search term (added by the Tag plugin via Hooks::KANBAN_FILTERS
) does not work. Other built-in filters (e.g.user:,team:) work correctly on the same board.When interacting with an already-entered tag: filter term in the search box (e.g. clicking on it to edit), the browser console shows:
Uncaught TypeError: Cannot read properties of undefined (reading 'raw')
at SearchInput.makeTagEditable (SearchInput.js:497:1)
at HTMLSpanElement. (SearchInput.js:358:1)
at HTMLDivElement.dispatch (base.min.js:156:41760)
at HTMLDivElement. (base.min.js:156:39643)
This appears to happen because SearchInput.makeTagEditable expects a matching suggestion object (with a .raw property) from a predefined list of values for the tag, but the tag filter registered by the Tag plugin is a free-text filter with no predefined values list — so the lookup returns undefined and the subsequent .raw access throws. After this error, the Kanban's filtering JS appears to break entirely and the filter is never applied to the displayed cards.
This looks related to a previously reported GLPI core issue (glpi-project/glpi#13593), where the same SearchInput.js code path failed for the type: filter on 10.0.5 for a similar reason (missing suggestion data). It seems to now affect the Tag plugin's tag:
/tagged: filters on GLPI 11.0.8.Relevant log output
Page URL
No response
Steps To reproduce
Expected behavior:
The tag: filter should actually filter the visible Project cards by tag, and clicking to edit an existing filter term should not throw a JS error.
Actual behavior:
No filtering occurs on the cards, and a JS TypeError is thrown in the console, which appears to break further Kanban filter interactions.
Your GLPI setup information
No response
Anything else?
user:,team:) work fine on the same board.$common_kanban_filters = [
'tag' => [
'description' => _x('filters', 'If the item has a tag', 'tag'),
'supported_prefixes' => ['!'],
],
'tagged' => [
'description' => _x('filters', 'If the item is tagged', 'tag'),
'supported_prefixes' => ['!'],
],
];
No values (suggestion list) is provided for the tag filter, which may be what triggers the core JS bug when the term is rendered/edited.