Skip to content

[GLPI 10] Error during block creation - Add tab field #1141

@alanlehoux

Description

@alanlehoux

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

GLPI Version

10.0.19

Plugin version

1.21.27

Bug description

Hello!

I created an additional "Add Tab" field for the associated Tickets element, and when I save the block (upon creation), I get a blank screen. Later, if I go to the created blocks, I see the block "already created," but when I try to create a field within it, I get a blank screen with the following error:

0 multiple alter in glpi_plugin_fields_ticketcompliances - Error durante la consulta a la base de datos: ALTER TABLE glpi_plugin_fields_ticketcompliances ADD plugin_fields_apartadodelanormafielddropdowns_id INT unsigned NOT NULL DEFAULT 0 - El error es Table 'glpi.glpi_plugin_fields_ticketcompliances' doesn't exist

Clearly, the table for the additional field is not created due to a previous error.

When I activate debug mode, if I delete the incorrectly created block and recreate it with the same name, I see this error on the first blank screen:

Image

(Ignore the time zone error)

To resolve this issue in my GLPI, I did the following:

I went to line 23 of the file /var/www/glpi/files/_plugins/fields/inc/ticketcompliance.class.php and verified that it was trying to call the Ticket element as if it were a constant. I modified Ticket with single quotes, as shown in the image:

Image

This was so that "Ticket" would be recognized as text.

I saved and closed.

But since the table wasn't created in the database, I had to create it manually.

Once the expected table was created, I was able to create the additional field within the "Compliances" block of my additional fields.

Relevant log output

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

Operating system: Linux -------------------------- #​88~20.04.1-Ubuntu SMP Fri Mar 28 14:17:22 UTC 2025 x86_64
PHP 8.2.15 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, bz2, calendar, ctype,
curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli,
mysqlnd, openssl, pcre, pdo_mysql, posix, random, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem,
sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, yaml, zip, zlib)
Setup: max_execution_time="30" memory_limit="4096M" post_max_size="100M" safe_mode="" session.save_handler="files"
upload_max_filesize="100M" disable_functions=""
Software: Apache/2.4.41 (Ubuntu) (Apache/2.4.41 (Ubuntu) Server at -------------------- Port 443
)
Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
Server Software: Ubuntu 20.04
Server Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Parameters: -----------@localhost/glpi
Host info: Localhost via UNIX socket

PHP version (8.2.15) is supported.PHP version (8.2.15) is supported.
Sessions configuration is OK.Sessions configuration is OK.
Allocated memory is sufficient.Allocated memory is sufficient.
mysqli extension is installed.mysqli extension is installed.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
curl extension is installed.curl extension is installed.
gd extension is installed.gd extension is installed.
intl extension is installed.intl extension is installed.
zlib extension is installed.zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.3.39) is supported.Database engine version (10.3.39) is supported.
No files from previous GLPI version detected.No files from previous GLPI version detected.
The log file has been created successfully.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/_dumps 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.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/_dumps 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.

Web server root directory configuration seems safe.Web server root directory configuration seems safe.
Sessions configuration is secured.Sessions configuration is secured.
OS and PHP are relying on 64 bits integers.OS and PHP are relying on 64 bits integers.
exif extension is installed.exif extension is installed.
ldap extension is installed.ldap extension is installed.
openssl extension is installed.openssl extension is installed.
Following extensions are installed: bz2, Phar, zip.Following extensions are installed: bz2, Phar, zip.
Zend OPcache extension is installed.Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.Following extensions are installed: ctype, iconv, mbstring, 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.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions