Skip to content

An unexpected error occurred when accessing "Assets/Computers" #21491

@bastien33260

Description

@bastien33260

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

11.0.1

Bug description

We very recently upgraded our GLPI version (From 10.0.19 to 11.0.1) and we started getting a weird error that prevents us from using GLPI to search for computers in our database :

An unexpected error occurred
Return to previous page
Top of the page

I believe this only started happening ever since we installed the newest version, and the migration seemed to have happened without any issue as well.
We typically use GLPI Inventory with the GLPI Agent installed on all the computers we have.
It seems that once the issue occurs, the page still refuses to display properly until the browser is completely cleared of its cache, even when removing all the search terms.

Relevant log output

There doesn’t seem to be anything relevant to this issue in the GLPI logs, but I noticed some errors in my browser’s console that could potentially help figure out what’s going on.
Image

There is also this error that pops up in php-errors.log but it might be completely unrelated :

[2025-10-15 07:56:04] glpi.CRITICAL:   *** Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("Cannot build an empty expression") in "pages/generic_list.html.twig" at line 37." at generic_list.html.twig line 37
  Backtrace :
  ./templates/pages/generic_list.html.twig:37
  ./vendor/twig/twig/src/Template.php:358            Twig\Template->yield()
  ./vendor/twig/twig/src/Template.php:373            Twig\Template->display()
  ./vendor/twig/twig/src/TemplateWrapper.php:51      Twig\Template->render()
  .../Glpi/Application/View/TemplateRenderer.php:170 Twig\TemplateWrapper->render()
  ./src/Glpi/Controller/AbstractController.php:68    Glpi\Application\View\TemplateRenderer->render()
  ./src/Glpi/Controller/GenericListController.php:51 Glpi\Controller\AbstractController->render()
  ./vendor/symfony/http-kernel/HttpKernel.php:181    Glpi\Controller\GenericListController->__invoke()
  ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
  ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
  ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()
  Previous: Cannot build an empty expression
  ./src/Glpi/DBAL/QueryExpression.php:58
  ./src/Glpi/Search/Provider/SQLProvider.php:1531    Glpi\DBAL\QueryExpression->__construct()
  ./src/Search.php:644                               Glpi\Search\Provider\SQLProvider::getWhereCriteria()
  ./src/Glpi/Search/Provider/SQLProvider.php:4793    Search::addWhere()
  ./src/Glpi/Search/Provider/SQLProvider.php:4266    Glpi\Search\Provider\SQLProvider::constructCriteriaSQL()
  ./src/Glpi/Search/SearchEngine.php:654             Glpi\Search\Provider\SQLProvider::constructSQL()
  ./src/Glpi/Search/SearchEngine.php:670             Glpi\Search\SearchEngine::getData()
  ./src/Glpi/Search/SearchEngine.php:627             Glpi\Search\SearchEngine::showOutput()
  :                                                  Glpi\Search\SearchEngine::show()
  .../Application/View/Extension/PhpExtension.php:93 call_user_func_array()
  ...ates/87/8720b18a4db42e16e3ad3e58dc6ab1ae.php:55 Glpi\Application\View\Extension\PhpExtension->call()
  ./vendor/twig/twig/src/Template.php:402            __TwigTemplate_ab070da1fc3e5c9d0bd52448818f1268->doDisplay()
  ./vendor/twig/twig/src/Template.php:358            Twig\Template->yield()
  ./vendor/twig/twig/src/Template.php:373            Twig\Template->display()
  ./vendor/twig/twig/src/TemplateWrapper.php:51      Twig\Template->render()
  .../Glpi/Application/View/TemplateRenderer.php:170 Twig\TemplateWrapper->render()
  ./src/Glpi/Controller/AbstractController.php:68    Glpi\Application\View\TemplateRenderer->render()
  ./src/Glpi/Controller/GenericListController.php:51 Glpi\Controller\AbstractController->render()
  ./vendor/symfony/http-kernel/HttpKernel.php:181    Glpi\Controller\GenericListController->__invoke()
  ./vendor/symfony/http-kernel/HttpKernel.php:76     Symfony\Component\HttpKernel\HttpKernel->handleRaw()
  ./vendor/symfony/http-kernel/Kernel.php:197        Symfony\Component\HttpKernel\HttpKernel->handle()
  ./public/index.php:70                              Symfony\Component\HttpKernel\Kernel->handle()

Page URL

No response

Steps To reproduce

  1. Go to "Assets/Computers"
  2. Change the first search field to "does not contain"
  3. Type a search criteria
  4. Add another rule and type another criteria
  5. Click search. The page gives me an error
Image

Your GLPI setup information

GLPI: 11.0.1 ( => /var/www/glpi)
Installation mode: TARBALL
Current language: en_US
Source Integrity: 1 files changed
A: inc/downstream.php

Operating system: Linux ServerGLPI2 6.1.0-40-amd64 #​1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64

PHP: 8.3.26 apache2handler

PHP extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium,
apache2handler, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext,
iconv, intl, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm,
tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache

Setup: disable_functions="" max_execution_time="600" max_input_vars="1000" memory_limit="64M" post_max_size="256M"
session.cookie_secure="1" session.cookie_httponly="1" session.cookie_samesite="" session.save_handler="files"
upload_max_filesize="256M"

Web server: Apache/2.4.65 (Debian) (Apache/2.4.65 (Debian) Server at helpdesk.latestedebuch.fr Port 443)

User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0

Database:

Server Software: Debian 12

Server Version: 10.11.14-MariaDB-0+deb12u2

Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Parameters: [email protected]/glpi

Host info: 127.0.0.1 via TCP/IP

Requirements:
PHP version (8.3.26) is supported.PHP version (8.3.26) is supported.
OS and PHP are relying on 64 bits integers.OS and PHP are relying on 64 bits integers.
Sessions configuration is OK.Sessions configuration is OK.
Allocated memory is sufficient.Allocated memory is sufficient.
Following extensions are installed: dom, fileinfo, filter, libxml, simplexml, tokenizer,
xmlreader, xmlwriter.Following extensions are installed: dom, fileinfo, filter, libxml, simplexml, tokenizer, xmlreader,
xmlwriter.
mysqli extension is installedmysqli extension is installed
curl extension is installedcurl extension is installed
gd extension is installedgd extension is installed
intl extension is installedintl extension is installed
mbstring extension is installedmbstring extension is installed
zlib extension is installedzlib extension is installed
bcmath extension is installedbcmath extension is installed
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.The constant
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
openssl extension is installedopenssl extension is installed
Database engine version (10.11.14) is supported.Database engine version (10.11.14) is
supported.
The log file has been created successfully.The log file has been created successfully.
Write access to /var/lib/glpi/files/_cache has been validated. Write access to
/var/lib/glpi/files/_cron has been validated. Write access to /var/lib/glpi/files has been validated. Write access to
/var/lib/glpi/files/_graphs has been validated. Write access to /var/lib/glpi/files/_lock has been validated. Write access to
/var/lib/glpi/files/_pictures has been validated. Write access to /var/lib/glpi/files/_plugins has been validated. Write access
to /var/lib/glpi/files/_rss has been validated. Write access to /var/lib/glpi/files/_sessions has been validated. Write access
to /var/lib/glpi/files/_tmp has been validated. Write access to /var/lib/glpi/files/_uploads has been validated.Write access
to /var/lib/glpi/files/_cache has been validated.
Write access to /var/lib/glpi/files/_cron has been validated.
Write access to /var/lib/glpi/files has been validated.
Write access to /var/lib/glpi/files/_graphs has been validated.
Write access to /var/lib/glpi/files/_lock has been validated.
Write access to /var/lib/glpi/files/_pictures has been validated.
Write access to /var/lib/glpi/files/_plugins has been validated.
Write access to /var/lib/glpi/files/_rss has been validated.
Write access to /var/lib/glpi/files/_sessions has been validated.
Write access to /var/lib/glpi/files/_tmp has been validated.
Write access to /var/lib/glpi/files/_uploads has been validated.

Sessions configuration is secured.Sessions configuration is secured.
exif extension is installedexif extension is installed
ldap extension is installedldap extension is installed
Following extensions are installed: bz2, Phar, zip.Following extensions are installed: bz2,
Phar, zip.
Zend OPcache extension is installedZend OPcache extension is installed
Following extensions are installed: ctype, iconv, sodium.Following extensions are installed:
ctype, iconv, sodium.
Write access to /var/www/glpi/marketplace has been validated.Write access to
/var/www/glpi/marketplace has been validated.
Timezones seems loaded in database.Timezones seems loaded in database.

Install Method: Marketplace
glpiinventory Name: GLPI Inventory Version: 1.6.0 State: Enabled

Anything else?

It seems this issue only happens very specifically with "computers.php". I can try things around or give more details if required. Thank you very much for your support.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions