Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation templates don't fill the form #19170

Open
2 tasks done
arthurrschaefer opened this issue Mar 10, 2025 · 0 comments · May be fixed by #19194
Open
2 tasks done

Validation templates don't fill the form #19170

arthurrschaefer opened this issue Mar 10, 2025 · 0 comments · May be fixed by #19194
Assignees

Comments

@arthurrschaefer
Copy link

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.0-dev-git-main-2b411c35dd

Bug description

When creating a new validation template, this error appears once I click Save

Image

Also, when I choose this template while Asking for a validation, the form keeps blank.

Image

Relevant log output

glpi.WARNING:   *** Warning: Trying to access array offset on false at ITILValidationTemplate.php line 100
  Backtrace :
  ./src/ITILValidationTemplate.php:114               ITILValidationTemplate::displayValidatorField()
  .../twig/twig/src/Extension/CoreExtension.php:1882 ITILValidationTemplate->displaySpecificTypeField()
  ...tes/fb/fb6b488b6cb11916c86e4aef9ec2988a.php:505 Twig\Extension\CoreExtension::getAttribute()
  .../twig/twig/src/Extension/CoreExtension.php:2079 __TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03->{closure:__TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03::block_form_fields():502}()
  ...tes/fb/fb6b488b6cb11916c86e4aef9ec2988a.php:502 Twig\Extension\CoreExtension::captureOutput()
  ./vendor/twig/twig/src/Template.php:432            __TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03->block_form_fields()
  ...ates/fb/fb6b488b6cb11916c86e4aef9ec2988a.php:75 Twig\Template->yieldBlock()
  ./vendor/twig/twig/src/Template.php:388            __TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03->doDisplay()
  ./vendor/twig/twig/src/Template.php:344            Twig\Template->yield()
  ./vendor/twig/twig/src/Template.php:359            Twig\Template->display()
  ./vendor/twig/twig/src/TemplateWrapper.php:51      Twig\Template->render()
  .../Glpi/Application/View/TemplateRenderer.php:165 Twig\TemplateWrapper->render()
  ./src/CommonDropdown.php:364                       Glpi\Application\View\TemplateRenderer->render()
  ./src/AbstractITILChildTemplate.php:48             CommonDropdown->showForm()
  ./src/CommonGLPI.php:667                           AbstractITILChildTemplate->showForm()
  ./ajax/common.tabs.php:109                         CommonGLPI::displayStandardTab()
  ...Glpi/Controller/LegacyFileLoadController.php:59 require()
  ./vendor/symfony/http-kernel/HttpKernel.php:101    Glpi\Controller\LegacyFileLoadController->{closure:Glpi\Controller\LegacyFileLoadController::__invoke():58}()
  ...ymfony/http-foundation/StreamedResponse.php:106 Symfony\Component\HttpKernel\HttpKernel::{closure:Symfony\Component\HttpKernel\HttpKernel::handle():98}()
  ./vendor/symfony/http-foundation/Response.php:423  Symfony\Component\HttpFoundation\StreamedResponse->sendContent()
  ./src/Glpi/Kernel/Kernel.php:234                   Symfony\Component\HttpFoundation\Response->send()
  ./public/index.php:58                              Glpi\Kernel\Kernel->sendResponse()


---

glpi.WARNING:   *** Warning: Trying to access array offset on false at ITILValidationTemplate.php line 104
  Backtrace :
  ./src/ITILValidationTemplate.php:114               ITILValidationTemplate::displayValidatorField()
  .../twig/twig/src/Extension/CoreExtension.php:1882 ITILValidationTemplate->displaySpecificTypeField()
  ...tes/fb/fb6b488b6cb11916c86e4aef9ec2988a.php:505 Twig\Extension\CoreExtension::getAttribute()
  .../twig/twig/src/Extension/CoreExtension.php:2079 __TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03->{closure:__TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03::block_form_fields():502}()
  ...tes/fb/fb6b488b6cb11916c86e4aef9ec2988a.php:502 Twig\Extension\CoreExtension::captureOutput()
  ./vendor/twig/twig/src/Template.php:432            __TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03->block_form_fields()
  ...ates/fb/fb6b488b6cb11916c86e4aef9ec2988a.php:75 Twig\Template->yieldBlock()
  ./vendor/twig/twig/src/Template.php:388            __TwigTemplate_720957d3f490e9dbcb3a08dec3d27b03->doDisplay()
  ./vendor/twig/twig/src/Template.php:344            Twig\Template->yield()
  ./vendor/twig/twig/src/Template.php:359            Twig\Template->display()
  ./vendor/twig/twig/src/TemplateWrapper.php:51      Twig\Template->render()
  .../Glpi/Application/View/TemplateRenderer.php:165 Twig\TemplateWrapper->render()
  ./src/CommonDropdown.php:364                       Glpi\Application\View\TemplateRenderer->render()
  ./src/AbstractITILChildTemplate.php:48             CommonDropdown->showForm()
  ./src/CommonGLPI.php:667                           AbstractITILChildTemplate->showForm()
  ./ajax/common.tabs.php:109                         CommonGLPI::displayStandardTab()
  ...Glpi/Controller/LegacyFileLoadController.php:59 require()
  ./vendor/symfony/http-kernel/HttpKernel.php:101    Glpi\Controller\LegacyFileLoadController->{closure:Glpi\Controller\LegacyFileLoadController::__invoke():58}()
  ...ymfony/http-foundation/StreamedResponse.php:106 Symfony\Component\HttpKernel\HttpKernel::{closure:Symfony\Component\HttpKernel\HttpKernel::handle():98}()
  ./vendor/symfony/http-foundation/Response.php:423  Symfony\Component\HttpFoundation\StreamedResponse->sendContent()
  ./src/Glpi/Kernel/Kernel.php:234                   Symfony\Component\HttpFoundation\Response->send()
  ./public/index.php:58                              Glpi\Kernel\Kernel->sendResponse()

Page URL

No response

Steps To reproduce

  1. Setup > Dropdowns
  2. Validation Templates
  3. Create a new template
  4. Save it
  5. Try to use it in a ticket

Your GLPI setup information

GLPI information
GLPI: 11.0.0-dev-git-main-2b411c35dd ( => /var/www/glpi)
Installation mode: GIT
Current language: en_US
Server
Operating system: Linux cfb5b2e1f056 6.5.0-1025-azure #​26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024 x86_64

PHP: 8.4.4 apache2handler

PHP extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, hash, iconv, json,
mbstring, SPL, session, PDO, pdo_sqlite, bz2, posix, random, Reflection, standard, SimpleXML, tokenizer, xml, xmlreader,
xmlwriter, mysqlnd, apache2handler, bcmath, Phar, exif, gd, intl, ldap, memcached, mysqli, pcntl, redis, sodium, xmlrpc, zip,
Zend OPcache, xdebug

Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
upload_max_filesize="2M" disable_functions=""

Web server: Apache/2.4.62 (Debian) (Apache/2.4.62 (Debian) Server at localhost Port 8080)

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0
Safari/537.36

Database:

Server Software: mariadb.org binary distribution

Server Version: 11.4.5-MariaDB-ubu2404

Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Parameters: glpi@glpi-db/glpi

Host info: glpi-db via TCP/IP

Requirements:
PHP version (8.4.4) is supported.
OS and PHP are relying on 64 bits integers.
Sessions configuration is OK.
Allocated memory is sufficient.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
mysqli extension is installed.
curl extension is installed.
gd extension is installed.
intl extension is installed.
mbstring extension is installed.
zlib extension is installed.
bcmath extension is installed.
The constant
SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
openssl extension is installed.
Database engine version (11.4.5) is supported.
No files from previous GLPI version detected.
The log file has been created successfully.
Write access
to /var/www/glpi/files/_cache has been validated.
Write access to /var/www/glpi/files/_cron has been validated.
Write access to /var/www/glpi/files has been validated.
Write access to /var/www/glpi/files/_graphs has been validated.
Write access to /var/www/glpi/files/_lock has been validated.
Write access to /var/www/glpi/files/_pictures has been validated.
Write access to /var/www/glpi/files/_plugins has been validated.
Write access to /var/www/glpi/files/_rss has been validated.
Write access to /var/www/glpi/files/_sessions has been validated.
Write access to /var/www/glpi/files/_tmp has been validated.
Write access to /var/www/glpi/files/_uploads has been validated.

Sessions configuration is secured.
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, sodium.
Write access to
/var/www/glpi/marketplace has been validated.
Timezones seems loaded in database.

GLPI constants
GLPI_ROOT: "/var/www/glpi"
GLPI_VERSION: "11.0.0-dev"
GLPI_SCHEMA_VERSION: "11.0.0-dev@13be239ae6bd3007f9655988267b4d4317362a86"
GLPI_MIN_PHP: "8.2"
GLPI_MAX_PHP: "8.4"
GLPI_YEAR: "2025"
GLPI_I18N_DIR: "/var/www/glpi/locales"
GLPI_ENVIRONMENT_TYPE: "development"
GLPI_CONFIG_DIR: "/var/www/glpi/config"
GLPI_VAR_DIR: "/var/www/glpi/files"
GLPI_MARKETPLACE_DIR: "/var/www/glpi/marketplace"
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST:
["#^http://[^@:]+(:80)?(/.)?$#","#^https://[^@:]+(:443)?(/.)?$#","#^feed://[^@:]+(/.)?$#"]
GLPI_DISALLOWED_UPLOADS_PATTERN: "/\.(php\d
|phar)$/i"
GLPI_TELEMETRY_URI: "https://telemetry.glpi-project.org"
GLPI_INSTALL_MODE: "GIT"
GLPI_NETWORK_MAIL: "[email protected]"
GLPI_NETWORK_SERVICES: "https://services.glpi-network.com"
GLPI_MARKETPLACE_ENABLE: 3
GLPI_MARKETPLACE_PRERELEASES: true
GLPI_MARKETPLACE_ALLOW_OVERRIDE: true
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true
GLPI_USER_AGENT_EXTRA_COMMENTS: ""
GLPI_DOCUMENTATION_ROOT_URL: "https://links.glpi-project.org"
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: "1"
GLPI_AJAX_DASHBOARD: "1"
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_CENTRAL_WARNINGS: "1"
GLPI_TEXT_MAXSIZE: "4000"
GLPI_WEBHOOK_ALLOW_RESPONSE_SAVING: "1"
GLPI_DOC_DIR: "/var/www/glpi/files"
GLPI_CACHE_DIR: "/var/www/glpi/files/_cache"
GLPI_CRON_DIR: "/var/www/glpi/files/_cron"
GLPI_GRAPH_DIR: "/var/www/glpi/files/_graphs"
GLPI_LOCAL_I18N_DIR: "/var/www/glpi/files/_locales"
GLPI_LOCK_DIR: "/var/www/glpi/files/_lock"
GLPI_LOG_DIR: "/var/www/glpi/files/_log"
GLPI_PICTURE_DIR: "/var/www/glpi/files/_pictures"
GLPI_PLUGIN_DOC_DIR: "/var/www/glpi/files/_plugins"
GLPI_RSS_DIR: "/var/www/glpi/files/_rss"
GLPI_SESSION_DIR: "/var/www/glpi/files/_sessions"
GLPI_TMP_DIR: "/var/www/glpi/files/_tmp"
GLPI_UPLOAD_DIR: "/var/www/glpi/files/_uploads"
GLPI_INVENTORY_DIR: "/var/www/glpi/files/_inventories"
GLPI_THEMES_DIR: "/var/www/glpi/files/_themes"
GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/"
GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/marketplace/"
Libraries
symfony/mailer not found
simplepie/simplepie version 1.8.1 in /var/www/glpi/vendor/simplepie/simplepie/src
tecnickcom/tcpdf version 6.8.2 in /var/www/glpi/vendor/tecnickcom/tcpdf
tecnickcom/tc-lib-barcode version in /var/www/glpi/vendor/tecnickcom/tc-lib-barcode/src
sabre/dav version in /var/www/glpi/vendor/sabre/dav/lib/DAV
sabre/http version in /var/www/glpi/vendor/sabre/http/lib
sabre/uri version in /var/www/glpi/vendor/sabre/uri/lib
sabre/vobject version in /var/www/glpi/vendor/sabre/vobject/lib
laminas/laminas-i18n version in /var/www/glpi/vendor/laminas/laminas-i18n/src
monolog/monolog version in /var/www/glpi/vendor/monolog/monolog/src/Monolog
sebastian/diff version in /var/www/glpi/vendor/sebastian/diff/src
donatj/phpuseragentparser version in /var/www/glpi/vendor/donatj/phpuseragentparser/src/UserAgentPHP Deprecated function (8192):
LitEmoji\LitEmoji::encodeUnicode(): Implicitly marking parameter $encoding as nullable is deprecated, the explicit
nullable type must be used instead at LitEmoji.php line 62 in ./vendor/elvanto/litemoji/src/LitEmoji.php at line 62PHP Deprecated function
(8192): LitEmoji\LitEmoji::shortcodeToUnicode(): Implicitly marking parameter $encoding as nullable is deprecated, the
explicit nullable type must be used instead at LitEmoji.php line 75 in ./vendor/elvanto/litemoji/src/LitEmoji.php at line
75PHP
Deprecated function (8192): LitEmoji\LitEmoji::entitiesToUnicode(): Implicitly marking parameter $encoding as nullable is
deprecated, the explicit nullable type must be used instead at LitEmoji.php line 103 in
./vendor/elvanto/litemoji/src/LitEmoji.php at line 103PHP Deprecated function (8192): LitEmoji\LitEmoji::unicodeToShortcode():
Implicitly marking parameter $encoding as nullable is deprecated, the explicit nullable type must be used instead at
LitEmoji.php line 142 in ./vendor/elvanto/litemoji/src/LitEmoji.php at line 142
elvanto/litemoji version in /var/www/glpi/vendor/elvanto/litemoji/src
gettext/languages version in /var/www/glpi/vendor/gettext/languages/src
symfony/console version in /var/www/glpi/vendor/symfony/console
symfony/config version in /var/www/glpi/vendor/symfony/config/Loader
symfony/dependency-injection version in /var/www/glpi/vendor/symfony/dependency-injection
symfony/event-dispatcher version in /var/www/glpi/vendor/symfony/event-dispatcher
symfony/filesystem version in /var/www/glpi/vendor/symfony/filesystem
symfony/framework-bundle version in /var/www/glpi/vendor/symfony/framework-bundle
symfony/http-foundation version in /var/www/glpi/vendor/symfony/http-foundation
symfony/http-kernel version in /var/www/glpi/vendor/symfony/http-kernel
symfony/routing version in /var/www/glpi/vendor/symfony/routing
scssphp/scssphp version in /var/www/glpi/vendor/scssphp/scssphp/src
laminas/laminas-mail version in /var/www/glpi/vendor/laminas/laminas-mail/src/Protocol
laminas/laminas-mime version in /var/www/glpi/vendor/laminas/laminas-mime/src
rlanvin/php-rrule version in /var/www/glpi/vendor/rlanvin/php-rrule/src
ramsey/uuid version in /var/www/glpi/vendor/ramsey/uuid/src
phpoffice/phpspreadsheet version in /var/www/glpi/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet
psr/log version in /var/www/glpi/vendor/psr/log/src
psr/simple-cache version in /var/www/glpi/vendor/psr/simple-cache/src
psr/cache version in /var/www/glpi/vendor/psr/cache/src
psr/container version in /var/www/glpi/vendor/psr/container/src
league/csv version in /var/www/glpi/vendor/league/csv/src
mexitek/phpcolors version in /var/www/glpi/vendor/mexitek/phpcolors/src/Mexitek/PHPColors
guzzlehttp/guzzle version in /var/www/glpi/vendor/guzzlehttp/guzzle/src
guzzlehttp/psr7 version in /var/www/glpi/vendor/guzzlehttp/psr7/src
glpi-project/inventory_format version in /var/www/glpi/vendor/glpi-project/inventory_format/lib/php
wapmorgan/unified-archive version in /var/www/glpi/vendor/wapmorgan/unified-archive/src
paragonie/sodium_compat version in /var/www/glpi/vendor/paragonie/sodium_compat/src
symfony/cache version in /var/www/glpi/vendor/symfony/cache
html2text/html2text version in /var/www/glpi/vendor/html2text/html2text/src
symfony/css-selector version in /var/www/glpi/vendor/symfony/css-selector
symfony/dom-crawler version in /var/www/glpi/vendor/symfony/dom-crawler
twig/twig version in /var/www/glpi/vendor/twig/twig/src
twig/string-extra version in /var/www/glpi/vendor/twig/string-extra
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php83 not found
league/oauth2-client version in /var/www/glpi/vendor/league/oauth2-client/src/Provider
league/oauth2-google version in /var/www/glpi/vendor/league/oauth2-google/src/Provider
thenetworg/oauth2-azure version in /var/www/glpi/vendor/thenetworg/oauth2-azure/src/Provider
league/commonmark version in /var/www/glpi/vendor/league/commonmark/src/Extension/CommonMark
egulias/email-validator version in /var/www/glpi/vendor/egulias/email-validator/src
symfony/mime not found
apereo/phpcas version in /var/www/glpi/vendor/apereo/phpcas/source
bacon/bacon-qr-code version in /var/www/glpi/vendor/bacon/bacon-qr-code/src
robthree/twofactorauth version in /var/www/glpi/vendor/robthree/twofactorauth/lib
ralouphie/getallheaders not found
symfony/html-sanitizer version in /var/www/glpi/vendor/symfony/html-sanitizer
league/oauth2-server version in /var/www/glpi/vendor/league/oauth2-server/src
league/html-to-markdown version in /var/www/glpi/vendor/league/html-to-markdown/src
twig/markdown-extra version in /var/www/glpi/vendor/twig/markdown-extra
webonyx/graphql-php version in /var/www/glpi/vendor/webonyx/graphql-php/src
phpdocumentor/reflection-docblock version in /var/www/glpi/vendor/phpdocumentor/reflection-docblock/src
symfony/property-access version in /var/www/glpi/vendor/symfony/property-access
symfony/serializer version in /var/www/glpi/vendor/symfony/serializer
symfony/property-info version in /var/www/glpi/vendor/symfony/property-info
symfony/error-handler version in /var/www/glpi/vendor/symfony/error-handler
SQL Replicas
Not active
Notifications
Way of sending emails: PHP

Anything else?

No response

@cconard96 cconard96 linked a pull request Mar 13, 2025 that will close this issue
2 tasks
@cconard96 cconard96 self-assigned this Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants