order icon indicating copy to clipboard operation
order copied to clipboard

No more access to the old order form with glpi 10.0.1

Open IP-V15 opened this issue 4 months ago • 6 comments

Code of Conduct

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

Is there an existing issue for this?

  • [x] I have searched the existing issues

GLPI Version

10.0.1

Plugin version

2.12.0

Bug description

Since I updated GLPI 11.0.0 to GLPI 11.0.1, when I click on the "Order" tab and "order item" on an existing order, I get the message "an error has occurred" which is displayed.

Relevant log output

php.error.log
[2025-10-13 20:59:45] glpi.CRITICAL:   *** Uncaught PHP Exception LogicException: "Missing table name." at DBmysqlIterator.php line 289
  Backtrace :
  .\src\DBmysqlIterator.php:289                      
  .\src\DBmysqlIterator.php:122                      DBmysqlIterator->buildQuery()
  .\src\DBmysql.php:1040                             DBmysqlIterator->execute()
  .\marketplace\order\inc\order.class.php:2297       DBmysql->request()
  .\marketplace\order\inc\order.class.php:934        PluginOrderOrder->isOverBudget()
  .\src\CommonGLPI.php:683                           PluginOrderOrder->showForm()
  .\ajax\common.tabs.php:108                         CommonGLPI::displayStandardTab()
  ...Glpi\Controller\LegacyFileLoadController.php:64 require()
  .\vendor\symfony\http-kernel\HttpKernel.php:181    Glpi\Controller\LegacyFileLoadController->__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()

[2025-10-13 21:00:13] glpi.CRITICAL:   *** Uncaught PHP Exception Twig\Error\SyntaxError: "Unknown "__s" function. Did you mean "__" in "@order/order_getitems.html.twig" at line 52?" at order_getitems.html.twig line 52
  Backtrace :
  ...ace\order\templates\order_getitems.html.twig:52 
  ...ionParser\Infix\FunctionExpressionParser.php:51 Twig\Parser->getFunction()
  .\vendor\twig\twig\src\Parser.php:384              Twig\ExpressionParser\Infix\FunctionExpressionParser->parse()
  .\vendor\twig\twig\src\Parser.php:174              Twig\Parser->parseExpression()
  ...\twig\twig\src\TokenParser\IfTokenParser.php:42 Twig\Parser->subparse()
  .\vendor\twig\twig\src\Parser.php:218              Twig\TokenParser\IfTokenParser->parse()
  ...\twig\twig\src\TokenParser\IfTokenParser.php:42 Twig\Parser->subparse()
  .\vendor\twig\twig\src\Parser.php:218              Twig\TokenParser\IfTokenParser->parse()
  .\vendor\twig\twig\src\Parser.php:101              Twig\Parser->subparse()
  .\vendor\twig\twig\src\Environment.php:558         Twig\Parser->parse()
  .\vendor\twig\twig\src\Environment.php:589         Twig\Environment->parse()
  .\vendor\twig\twig\src\Environment.php:408         Twig\Environment->compileSource()
  .\vendor\twig\twig\src\Environment.php:370         Twig\Environment->loadTemplate()
  ...\Glpi\Application\View\TemplateRenderer.php:188 Twig\Environment->load()
  .\marketplace\order\inc\order_item.class.php:1079  Glpi\Application\View\TemplateRenderer->display()
  .\marketplace\order\inc\order_item.class.php:938   PluginOrderOrder_Item->getItems()
  .\marketplace\order\inc\order_item.class.php:433   PluginOrderOrder_Item->showFormDetail()
  .\marketplace\order\inc\order_item.class.php:2225  PluginOrderOrder_Item->showItem()
  .\src\CommonGLPI.php:694                           PluginOrderOrder_Item::displayTabContentForItem()
  .\ajax\common.tabs.php:108                         CommonGLPI::displayStandardTab()
  ...Glpi\Controller\LegacyFileLoadController.php:64 require()
  .\vendor\symfony\http-kernel\HttpKernel.php:181    Glpi\Controller\LegacyFileLoadController->__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

/plugins/order/front/order.form.php?id=659

Steps To reproduce

No response

Your GLPI setup information

Operating system: Windows NT SRV-GLPI 10.0 build 14393 (Windows Server 2016) AMD64

PHP: 8.2.12 apache2handler

PHP extensions: Core, bcmath, calendar, ctype, date, filter, hash, iconv, json, SPL, pcre, random, readline, Reflection, session, standard, mysqlnd, tokenizer, zlib, libxml, dom, PDO, bz2, SimpleXML, xml, xmlreader, xmlwriter, apache2handler, openssl, ldap, curl, fileinfo, gd, gettext, intl, mbstring, exif, mysqli, odbc, pdo_mysql, PDO_ODBC, pdo_sqlite, zip, Phar, ftp

Setup: disable_functions="" max_execution_time="120" max_input_vars="1000" memory_limit="512M" post_max_size="40M" session.cookie_secure="0" session.cookie_httponly="1" session.cookie_samesite="" session.save_handler="files" upload_max_filesize="40M"

Web server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 (Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 Server at 192.168.11.53 Port 80)

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

Server Software: mariadb.org binary distribution

Server Version: 10.11.14-MariaDB

Server SQL Mode: NO_ZERO_IN_DATE,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION

Parameters: root@localhost/glpi

Host info: localhost via TCP/IP

Requirements: PHP version (8.2.12) is supported.PHP version (8.2.12) 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.6.23) is supported.Database engine version (10.6.23) is supported. The log file has been created successfully.The log file has been created successfully. Write access to C:\xampp\htdocs\glpi/files/_cache has been validated. Write access to C:\xampp\htdocs\glpi/files/_cron has been validated. Write access to C:\xampp\htdocs\glpi/files has been validated. Write access to C:\xampp\htdocs\glpi/files/_graphs has been validated. Write access to C:\xampp\htdocs\glpi/files/_lock has been validated. Write access to C:\xampp\htdocs\glpi/files/_pictures has been validated. Write access to C:\xampp\htdocs\glpi/files/_plugins has been validated. Write access to C:\xampp\htdocs\glpi/files/_rss has been validated. Write access to C:\xampp\htdocs\glpi/files/_sessions has been validated. Write access to C:\xampp\htdocs\glpi/files/_tmp has been validated. Write access to C:\xampp\htdocs\glpi/files/_uploads has been validated.Write access to C:\xampp\htdocs\glpi/files/_cache has been validated. Write access to C:\xampp\htdocs\glpi/files/_cron has been validated. Write access to C:\xampp\htdocs\glpi/files has been validated. Write access to C:\xampp\htdocs\glpi/files/_graphs has been validated. Write access to C:\xampp\htdocs\glpi/files/_lock has been validated. Write access to C:\xampp\htdocs\glpi/files/_pictures has been validated. Write access to C:\xampp\htdocs\glpi/files/_plugins has been validated. Write access to C:\xampp\htdocs\glpi/files/_rss has been validated. Write access to C:\xampp\htdocs\glpi/files/_sessions has been validated. Write access to C:\xampp\htdocs\glpi/files/_tmp has been validated. Write access to C:\xampp\htdocs\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 not presentZend OPcache extension is not present Following extensions are installed: ctype, iconv. Following extensions are not present: sodium.Following extensions are installed: ctype, iconv. Following extensions are not present: sodium. Write access to C:\xampp\htdocs\glpi/marketplace has been validated.Write access to C:\xampp\htdocs\glpi/marketplace has been validated. Timezones seems loaded in database.Timezones seems loaded in database.

Anything else?

No response

IP-V15 avatar Oct 14 '25 08:10 IP-V15

Please retry with fresh release 2.12.1

stonebuzz avatar Oct 14 '25 08:10 stonebuzz

OK. Now I only get the error message on the purchase order summary page (order).

Error messages : glpi.WARNING: *** User Warning: MySQL query warnings: SQL: SELECT go.entities_id AS entities_id, go.is_recursive AS is_recursive, goi.id AS items_id FROM glpi_plugin_order_orders AS go, glpi_plugin_order_orders_items AS goi WHERE goi.plugin_order_orders_id = 'go.id' Warnings: 1292: Truncated incorrect DECIMAL value: 'go.id' at DBmysql.php line 399 Backtrace : .\src\DBmysql.php:399
.\src\DBmysqlIterator.php:123 DBmysql->doQuery() .\src\DBmysql.php:1040 DBmysqlIterator->execute() .\marketplace\order\inc\order_item.class.php:2129 DBmysql->request() .\marketplace\order\hook.php:76 PluginOrderOrder_Item::install() .\src\Plugin.php:1160 plugin_order_install() : Plugin->install() .\src\Glpi\Marketplace\Controller.php:655 call_user_func() .\src\Glpi\Marketplace\Controller.php:545 Glpi\Marketplace\Controller->setPluginState() .\src\Glpi\Marketplace\Controller.php:276 Glpi\Marketplace\Controller->installPlugin() .\ajax\marketplace.php:55 Glpi\Marketplace\Controller->downloadPlugin() ...Glpi\Controller\LegacyFileLoadController.php:64 require()

glpi.CRITICAL: *** Uncaught PHP Exception LogicException: "Missing table name." at DBmysqlIterator.php line 289 Backtrace : .\src\DBmysqlIterator.php:289
.\src\DBmysqlIterator.php:122 DBmysqlIterator->buildQuery() .\src\DBmysql.php:1040 DBmysqlIterator->execute() .\marketplace\order\inc\order.class.php:2311 DBmysql->request() .\marketplace\order\inc\order.class.php:947 PluginOrderOrder->isOverBudget() .\src\CommonGLPI.php:683 PluginOrderOrder->showForm() .\ajax\common.tabs.php:108 CommonGLPI::displayStandardTab() ...Glpi\Controller\LegacyFileLoadController.php:64 require() .\vendor\symfony\http-kernel\HttpKernel.php:181 Glpi\Controller\LegacyFileLoadController->__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()

IP-V15 avatar Oct 14 '25 09:10 IP-V15

I checked several purchase orders. Most of them show the message on the top of the "order" page. There are a few purchase orders where the "order" page is displayed, but the error message then only appears in the "cost" area of ​​the page.

message : glpi.CRITICAL: *** Uncaught PHP Exception RuntimeException: "MySQL query error: Unknown column 'price_ati-price_discounted' in 'SELECT' (1054) in SQL query "SELECT SUM(price_ati) AS priceTTC, SUM(price_discounted) AS priceHT, SUM(price_ati`` - ``price_discounted) AS priceTVA FROM glpi_plugin_order_orders_items WHERE plugin_order_orders_id = '656'"." at DBmysql.php line 371 Backtrace : .\src\DBmysql.php:371
.\src\DBmysqlIterator.php:123 DBmysql->doQuery() .\src\DBmysql.php:1040 DBmysqlIterator->execute() .\marketplace\order\inc\order_item.class.php:1364 DBmysql->request() .\marketplace\order\inc\order.class.php:1463 PluginOrderOrder_Item->getAllPrices() .\src\CommonGLPI.php:683 PluginOrderOrder->showForm() .\ajax\common.tabs.php:108 CommonGLPI::displayStandardTab() ...Glpi\Controller\LegacyFileLoadController.php:64 require() .\vendor\symfony\http-kernel\HttpKernel.php:181 Glpi\Controller\LegacyFileLoadController->__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()


glpi.WARNING: *** Warning: Undefined array key "ticket_per_item" at CommonITILRecurrentCron.php line 98 Backtrace : .\src\CommonITILRecurrentCron.php:98
.\src\CronTask.php:885 CommonITILRecurrentCron::cronRecurrentItems() .\front\cron.php:165 CronTask::launch() .\vendor\symfony\http-kernel\HttpKernel.php:101 Glpi\Controller\LegacyFileLoadController->{closure}() ...ymfony\http-foundation\StreamedResponse.php:106 Symfony\Component\HttpKernel\HttpKernel::Symfony\Component\HttpKernel{closure}() .\vendor\symfony\http-foundation\Response.php:423 Symfony\Component\HttpFoundation\StreamedResponse->sendContent() .\src\Glpi\Kernel\Kernel.php:295 Symfony\Component\HttpFoundation\Response->send() .\public\index.php:72 Glpi\Kernel\Kernel->sendResponse()

IP-V15 avatar Oct 14 '25 10:10 IP-V15

@RomainLvr can you check ?

stonebuzz avatar Oct 14 '25 11:10 stonebuzz

Hello What should I check? Thank

IP-V15 avatar Oct 14 '25 12:10 IP-V15

Is for @RomainLvr not for you @IP-V15 =)

stonebuzz avatar Oct 14 '25 13:10 stonebuzz

Problem solved with version 2.12.2. Thanks !

IP-V15 avatar Nov 13 '25 18:11 IP-V15