Search in Keyword Manager not working #1148

Closed
opened 2026-10-05 00:33:09 +02:00 by adam · 2 comments
Owner

From version 11.0.0 the search for keywords in the keyword manager is no longer possible. The reason for this is a missing "toLowerCase" in the JavaScript function isDataSearched in the file admin/default/js/tags.js

My fixed version:
function isDataSearched(tagObj) {
let name = tagObj.name.toLowerCase();
let stringSearch = $("#search-tag .search-input").val();
if (name.includes(stringSearch.toLowerCase())) {
return true;
} else {
return false;
}
}

I also use the includes function instead of the startWith function. This means that the search pattern is also searched for within the keyword. Find that personally more comfortable.

From version 11.0.0 the search for keywords in the keyword manager is no longer possible. The reason for this is a missing "toLowerCase" in the JavaScript function isDataSearched in the file admin/default/js/tags.js My fixed version: function isDataSearched(tagObj) { let name = tagObj.name.toLowerCase(); let stringSearch = $("#search-tag .search-input").val(); if (name.includes(stringSearch.toLowerCase())) { return true; } else { return false; } } I also use the includes function instead of the startWith function. This means that the search pattern is also searched for within the keyword. Find that personally more comfortable. <!-- github-sync-id:801436416 -->
adam closed this issue 2026-10-05 00:33:09 +02:00
Author
Owner

Oh, yes thanks, that will fix #1315

I agree, includes is better than startsWith here.

Oh, yes thanks, that will fix #1315 I agree, `includes` is better than `startsWith` here. <!-- github-comment-id:773566685 -->
Author
Owner

Thank you, that sounds good

Thank you, that sounds good <!-- github-comment-id:773872767 -->
adam changed title from Search in Keyword Manager not working to Search in Keyword Manager not working 2026-10-27 11:18:18 +01:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1148