Code of Conduct
Is there an existing issue for this?
GLPI Version
GLPI 10.0.20 / Plugin Tag 2.12.5 / also on GLPI 11
Plugin version
2.12.5 / 2.13.0
Bug description
Summary
We have been using the Tag plugin in GLPI for asset management,
but since a certain version, tag-based searches stopped filtering correctly.
Currently, when searching by Tag (e.g. "Tag = 3"),
the search result includes unrelated items or items from different itemtypes.
The issue occurs with the following environment:
- GLPI version: 10.0.20
- Plugin Tag version: 2.12.5
- (Also tested on GLPI 11.0, with the same behavior)
We initially thought upgrading GLPI to 11 might fix it,
but the problem persisted.
Since tag-based filtering is an important feature for our operations,
we sought assistance (including ChatGPT) and applied a temporary fix in
/usr/local/glpi/marketplace/tag/hook.php.
After adding the following modification, searches seem to work correctly again.
'joinparams' => [
'beforejoin' => [
'table' => 'glpi_plugin_tag_tagitems',
'joinparams' => [
'jointype' => 'itemtype_item',
'condition' => "AND `NEWTABLE`.`itemtype` = '$itemtype'",
],
],
],
This change restores correct tag filtering by itemtype.
It appears that since GLPI 10.0.19, specific_itemtype is no longer applied
to the JOIN condition in Search::addLeftJoin() — so the Tag plugin’s
default join no longer restricts results properly.
The modification above is only a temporary workaround,
but it allows the Tag filter to behave as before.
Environment
| Component |
Version |
| GLPI |
10.0.20 (and 11.0 tested) |
| Tag Plugin |
2.12.5 |
| PHP |
(8) |
| Database |
(mariadb11) |
Steps to Reproduce
- Open Assets → Computers (or Network Equipment, Printers, etc.)
- Add a search filter: “Tag = X”
- The result includes items that have other tags or belong to different itemtypes.
Expected Behavior
Only items linked to the specified tag and same itemtype should appear in the search results.
Actual Behavior
Search results include unrelated or cross-itemtype entries.
It seems the tag JOIN condition is missing the itemtype restriction.
Notes
- The change above is a temporary workaround, not an official fix.
- The issue likely originates from GLPI core changes (10.0.19+),
where specific_itemtype is ignored in Search::addLeftJoin().
- It would be great if a proper fix could be included in a future Tag plugin release.
Thank you for maintaining this plugin!
It’s a key feature for our asset management workflow,
and I hope this report helps improve compatibility with recent GLPI versions.
Relevant log output
Page URL
front/computer.php and others
Steps To reproduce
- This occurs simply by specifying tags and searching.
Your GLPI setup information
Information about system installation and configuration
GLPI 10.0.20 ( => /usr/local/glpi)
Installation mode: TARBALL
Current language:en_GB
Server
Operating system: Linux glpi01t.i.qualitia.com 5.14.0-617.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Sep 15 21:46:13 UTC 2025 x86_64
PHP 8.2.28 fpm-fcgi (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bz2, calendar, cgi-fcgi, ctype, curl, date, dom,
exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre,
pdo_mysql, pdo_sqlite, random, session, sockets, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="3600" memory_limit="512M" post_max_size="64M" safe_mode="" session.save_handler="files"
upload_max_filesize="50M" disable_functions=""
Software: nginx/1.20.1
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Server Software: mariadb.org binary distribution
Server Version: 10.11.14-MariaDB-ubu2204
Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Parameters: glpi@127.0.0.1/glpi
Host info: 127.0.0.1 via TCP/IP
PHP version (8.2.28) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
curl extension is installed.
gd extension is installed.
intl extension is installed.
zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.11.14) is supported.
No files from previous GLPI version detected.
The log file has been created successfully.
Write access to /usr/local/glpi/files/_cache has been validated.
Write access to /usr/local/glpi/files/_cron has been validated.
Write access to /usr/local/glpi/files has been validated.
Write access to /usr/local/glpi/files/_dumps has been validated.
Write access to /usr/local/glpi/files/_graphs has been validated.
Write access to /usr/local/glpi/files/_lock has been validated.
Write access to /usr/local/glpi/files/_pictures has been validated.
Write access to /usr/local/glpi/files/_plugins has been validated.
Write access to /usr/local/glpi/files/_rss has been validated.
Write access to /usr/local/glpi/files/_sessions has been validated.
Write access to /usr/local/glpi/files/_tmp has been validated.
Write access to /usr/local/glpi/files/_uploads has been validated.
SELinux configuration is OK.
Web server root directory configuration seems safe.
Sessions configuration is secured.
OS and PHP are relying on 64 bits integers.
exif extension is installed.
ldap extension is installed.
openssl extension is installed.
Following extensions are installed: bz2, Phar, zip.
Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring.
Following extensions are not present: sodium.
Write access to /usr/local/glpi/marketplace has been validated.
Timezones seems loaded in database.
GLPI constants
GLPI_ROOT: "/usr/local/glpi"
GLPI_CONFIG_DIR: "/usr/local/glpi/config"
GLPI_VAR_DIR: "/usr/local/glpi/files"
GLPI_MARKETPLACE_DIR: "/usr/local/glpi/marketplace"
GLPI_USE_CSRF_CHECK: "1"
GLPI_CSRF_EXPIRES: "7200"
GLPI_CSRF_MAX_TOKENS: "100"
GLPI_USE_IDOR_CHECK: "1"
GLPI_IDOR_EXPIRES: "7200"
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST: ["^\n (http|https|feed):// # protocol\n (\n (?:\n (?:xn--[a-z0-9-]++\.)*+xn--[a-z0-9-]++ # a domain name using punycode\n |\n (?:[\pL\pN\pS\pM\-\]++\.)+[\pL\pN\pM]++ # a multi-level domain name\n |\n [a-z0-9\-\]++ # a single-level domain name\n )\.?\n | # or\n \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address\n | # or\n \[\n (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::))))\n \] # an IPv6 address\n )\n (?:/ (?:[\pL\pN\pS\pM\-._\!$&'()+,;=:@]|%[0-9A-Fa-f]{2}) )* # a path\n (?:\? (?:[\pL\pN\-._\~!$&'\\+,;=:@/?]|%[0-9A-Fa-f]{2}) )? # a query (optional)\n $~ixuD"]
GLPI_DISALLOWED_UPLOADS_PATTERN: "/\.(php\d*|phar)$/i"
GLPI_TELEMETRY_URI: "https://telemetry.glpi-project.org"
GLPI_INSTALL_MODE: "TARBALL"
GLPI_NETWORK_MAIL: "glpi@teclib.com"
GLPI_NETWORK_SERVICES: "https://services.glpi-network.com"
GLPI_MARKETPLACE_ALLOW_OVERRIDE: true
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true
GLPI_USER_AGENT_EXTRA_COMMENTS: ""
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: "1"
GLPI_AJAX_DASHBOARD: "1"
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: "0"
GLPI_CENTRAL_WARNINGS: "1"
GLPI_TEXT_MAXSIZE: "4000"
GLPI_DOC_DIR: "/usr/local/glpi/files"
GLPI_CACHE_DIR: "/usr/local/glpi/files/_cache"
GLPI_CRON_DIR: "/usr/local/glpi/files/_cron"
GLPI_DUMP_DIR: "/usr/local/glpi/files/_dumps"
GLPI_GRAPH_DIR: "/usr/local/glpi/files/_graphs"
GLPI_LOCAL_I18N_DIR: "/usr/local/glpi/files/_locales"
GLPI_LOCK_DIR: "/usr/local/glpi/files/_lock"
GLPI_LOG_DIR: "/usr/local/glpi/files/_log"
GLPI_PICTURE_DIR: "/usr/local/glpi/files/_pictures"
GLPI_PLUGIN_DOC_DIR: "/usr/local/glpi/files/_plugins"
GLPI_RSS_DIR: "/usr/local/glpi/files/_rss"
GLPI_SESSION_DIR: "/usr/local/glpi/files/_sessions"
GLPI_TMP_DIR: "/usr/local/glpi/files/_tmp"
GLPI_UPLOAD_DIR: "/usr/local/glpi/files/_uploads"
GLPI_INVENTORY_DIR: "/usr/local/glpi/files/_inventories"
GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/"
GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/marketplace/"
GLPI_I18N_DIR: "/usr/local/glpi/locales"
GLPI_VERSION: "10.0.20"
GLPI_SCHEMA_VERSION: "10.0.20@d64066799f068b16ee973b377bdd13f984fe062a"
GLPI_MARKETPLACE_PRERELEASES: false
GLPI_MIN_PHP: "7.4.0"
GLPI_MAX_PHP: "8.6.0"
GLPI_YEAR: "2025"
Libraries
htmlawed/htmlawed version 1.2.14 in (/usr/local/glpi/vendor/htmlawed/htmlawed)
phpmailer/phpmailer version 6.8.0 in (/usr/local/glpi/vendor/phpmailer/phpmailer/src)
simplepie/simplepie version 1.5.8 in (/usr/local/glpi/vendor/simplepie/simplepie/library)
tecnickcom/tcpdf version 6.8.0 in (/usr/local/glpi/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/usr/local/glpi/vendor/michelf/php-markdown/Michelf)
true/punycode in (/usr/local/glpi/vendor/true/punycode/src)
iamcal/lib_autolink in (/usr/local/glpi/vendor/iamcal/lib_autolink)
sabre/dav in (/usr/local/glpi/vendor/sabre/dav/lib/DAV)
sabre/http in (/usr/local/glpi/vendor/sabre/http/lib)
sabre/uri in (/usr/local/glpi/vendor/sabre/uri/lib)
sabre/vobject in (/usr/local/glpi/vendor/sabre/vobject/lib)
laminas/laminas-i18n in (/usr/local/glpi/vendor/laminas/laminas-i18n/src)
laminas/laminas-servicemanager in (/usr/local/glpi/vendor/laminas/laminas-servicemanager/src)
monolog/monolog in (/usr/local/glpi/vendor/monolog/monolog/src/Monolog)
sebastian/diff in (/usr/local/glpi/vendor/sebastian/diff/src)
donatj/phpuseragentparser in (/usr/local/glpi/vendor/donatj/phpuseragentparser/src/UserAgent)
elvanto/litemoji in (/usr/local/glpi/vendor/elvanto/litemoji/src)
symfony/console in (/usr/local/glpi/vendor/symfony/console)
scssphp/scssphp in (/usr/local/glpi/vendor/scssphp/scssphp/src)
laminas/laminas-mail in (/usr/local/glpi/vendor/laminas/laminas-mail/src/Protocol)
laminas/laminas-mime in (/usr/local/glpi/vendor/laminas/laminas-mime/src)
rlanvin/php-rrule in (/usr/local/glpi/vendor/rlanvin/php-rrule/src)
ramsey/uuid in (/usr/local/glpi/vendor/ramsey/uuid/src)
psr/log in (/usr/local/glpi/vendor/psr/log/Psr/Log)
psr/simple-cache in (/usr/local/glpi/vendor/psr/simple-cache/src)
psr/cache in (/usr/local/glpi/vendor/psr/cache/src)
league/csv in (/usr/local/glpi/vendor/league/csv/src)
mexitek/phpcolors in (/usr/local/glpi/vendor/mexitek/phpcolors/src/Mexitek/PHPColors)
guzzlehttp/guzzle in (/usr/local/glpi/vendor/guzzlehttp/guzzle/src)
guzzlehttp/psr7 in (/usr/local/glpi/vendor/guzzlehttp/psr7/src)
glpi-project/inventory_format in (/usr/local/glpi/vendor/glpi-project/inventory_format/lib/php)
wapmorgan/unified-archive in (/usr/local/glpi/vendor/wapmorgan/unified-archive/src)
paragonie/sodium_compat in (/usr/local/glpi/vendor/paragonie/sodium_compat/src)
symfony/cache in (/usr/local/glpi/vendor/symfony/cache)
html2text/html2text in (/usr/local/glpi/vendor/html2text/html2text/src)
symfony/css-selector in (/usr/local/glpi/vendor/symfony/css-selector)
symfony/dom-crawler in (/usr/local/glpi/vendor/symfony/dom-crawler)
twig/twig in (/usr/local/glpi/vendor/twig/twig/src)
twig/string-extra in (/usr/local/glpi/vendor/twig/string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 not found
symfony/polyfill-php81 not found
symfony/polyfill-php82 in (/usr/local/glpi/vendor/symfony/polyfill-php82)
league/oauth2-client in (/usr/local/glpi/vendor/league/oauth2-client/src/Provider)
league/oauth2-google in (/usr/local/glpi/vendor/league/oauth2-google/src/Provider)
thenetworg/oauth2-azure in (/usr/local/glpi/vendor/thenetworg/oauth2-azure/src/Provider)
LDAP directories
Server: 'ldaps://10.130.8.176', Port: '636', BaseDN: 'OU=Accounts,OU=QUALITIA,OU=ORGANIZATION,DC=domain,DC=nsz,DC=jp',
Connection filter: '(&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))', RootDN:
'DOMAIN\glpi01t', Use TLS: none
Server: '10.130.8.144', Port: '389', BaseDN: 'dc=qualitia,dc=co,dc=jp', Connection filter:
'(&(objectClass=posixAccount)(objectClass=sambaSamAccount))', RootDN: 'cn=root,dc=qualitia,dc=co,dc=jp', Use TLS: none
SQL replicas
Not active
Notifications
Way of sending emails: SMTP (anonymous@localhost)
Plugins list
advancedplanning Name: advancedplanning Version: 1.1.1 State: Installed / not activated
Install Method: Marketplace
barcode Name: Barcode Version: 2.7.1 State: Installed / not activated
Install Method: Marketplace
formcreator Name: Form Creator Version: 2.13.10 State: Enabled
Install Method: Marketplace
gantt Name: gantt Version: 1.1.2 State: Enabled
Install Method: Marketplace
glpiinventory Name: GLPI Inventory Version: 1.5.3 State: Enabled
Install Method: Marketplace
geninventorynumber Name: Inventory number generation Version: 2.8.6 State: Installed / not activated
Install Method: Marketplace
addressing Name: IP Addressing Version: 3.0.3 State: Enabled
Install Method: Marketplace
genericobject Name: Objects management Version: 2.14.14 State: Enabled
Install Method: Marketplace
order Name: Orders management Version: 2.11.3 State: Installed / not activated
Install Method: Marketplace
pdf Name: Print to pdf Version: 4.0.2 State: Installed / not activated
Install Method: Marketplace
roundrobin Name: Round Robin Version: 1.0.9 State: Enabled
Install Method: Marketplace
webresources Name: Web Resources Version: 2.0.4 State: Enabled
Install Method: Marketplace
accounts Name: アカウント Version: 3.0.4 State: Enabled
Install Method: Marketplace
news Name: アラート Version: 1.12.5 State: Installed / not activated
Install Method: Marketplace
datainjection Name: インジェクション Version: 2.14.3 State: Installed / not activated
Install Method: Marketplace
tag Name: タグ管理 Version: 2.12.5 State: Enabled
Install Method: Marketplace
fields Name: 追加フィールド Version: 1.21.24 State: Enabled
Install Method: Marketplace
mreporting Name: 追加レポート Version: 1.8.9 State: Installed / not activated
Install Method: Marketplace
Anything else?
No response
Code of Conduct
Is there an existing issue for this?
GLPI Version
GLPI 10.0.20 / Plugin Tag 2.12.5 / also on GLPI 11
Plugin version
2.12.5 / 2.13.0
Bug description
Summary
We have been using the Tag plugin in GLPI for asset management,
but since a certain version, tag-based searches stopped filtering correctly.
Currently, when searching by Tag (e.g. "Tag = 3"),
the search result includes unrelated items or items from different
itemtypes.The issue occurs with the following environment:
We initially thought upgrading GLPI to 11 might fix it,
but the problem persisted.
Since tag-based filtering is an important feature for our operations,
we sought assistance (including ChatGPT) and applied a temporary fix in
/usr/local/glpi/marketplace/tag/hook.php.After adding the following modification, searches seem to work correctly again.
This change restores correct tag filtering by
itemtype.It appears that since GLPI 10.0.19,
specific_itemtypeis no longer appliedto the JOIN condition in
Search::addLeftJoin()— so the Tag plugin’sdefault join no longer restricts results properly.
The modification above is only a temporary workaround,
but it allows the Tag filter to behave as before.
Environment
Steps to Reproduce
Expected Behavior
Only items linked to the specified tag and same itemtype should appear in the search results.
Actual Behavior
Search results include unrelated or cross-itemtype entries.
It seems the tag JOIN condition is missing the
itemtyperestriction.Notes
where
specific_itemtypeis ignored inSearch::addLeftJoin().Thank you for maintaining this plugin!
It’s a key feature for our asset management workflow,
and I hope this report helps improve compatibility with recent GLPI versions.
Relevant log output
Page URL
front/computer.php and others
Steps To reproduce
Your GLPI setup information
Information about system installation and configuration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
No response