-
Notifications
You must be signed in to change notification settings - Fork 54
Description
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
11.0.2
Plugin version
2.15.3
Bug description
Problem:
I try to import the link between a contract and an element, in example a network device. When i start the import i get a MySQL error
Expection:
The Link between a contract and an asset should be created.
Relevant log output
PHP Warning (2):
Undefined array key "id" at contract_iteminjection.class.php line 118 in /var/glpi/marketplace/datainjection/inc/contract_iteminjection.class.php at line 118
MySQL query error: Incorrect integer value: '' for column 'contracts_id' at row 1 (1366) in SQL query "INSERT INTO `glpi_contracts_items` (`contracts_id`, `items_id`, `itemtype`) VALUES ('', '0', 'Contract_Item')".
In ./src/DBmysql.php(371)
#0 ./src/DBmysql.php(1327): DBmysql->doQuery()
#1 ./src/CommonDBTM.php(776): DBmysql->insert()
#2 ./src/CommonDBTM.php(1381): CommonDBTM->addToDB()
#3 /var/glpi/marketplace/datainjection/inc/commoninjectionlib.class.php(1705): CommonDBTM->add()
#4 /var/glpi/marketplace/datainjection/inc/commoninjectionlib.class.php(1561): PluginDatainjectionCommonInjectionLib->effectiveAddOrUpdate()
#5 /var/glpi/marketplace/datainjection/inc/contract_iteminjection.class.php(106): PluginDatainjectionCommonInjectionLib->processAddOrUpdate()
#6 /var/glpi/marketplace/datainjection/inc/engine.class.php(156): PluginDatainjectionContract_ItemInjection->addOrUpdateObject()
#7 /var/glpi/marketplace/datainjection/inc/clientinjection.class.php(225): PluginDatainjectionEngine->injectLine()
#8 /var/glpi/marketplace/datainjection/inc/clientinjection.class.php(171): PluginDatainjectionClientInjection::processInjection()
#9 /var/glpi/marketplace/datainjection/front/clientinjection.form.php(43): PluginDatainjectionClientInjection::showInjectionForm()
#10 ./src/Glpi/Controller/LegacyFileLoadController.php(64): require('...')
#11 ./vendor/symfony/http-kernel/HttpKernel.php(181): Glpi\Controller\LegacyFileLoadController->__invoke()
#12 ./vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#13 ./vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle()
#14 ./public/index.php(70): Symfony\Component\HttpKernel\Kernel->handle()
#15 {main}Page URL
https:///plugins/datainjection/front/clientinjection.form.php
Steps To reproduce
- create an asset
- create a contract
- create a import template for Contract_Item (contract asset link)
- start the csv imort with the content: contract names; asset serial numbers
- "Error appears"
Your GLPI setup information
GLPI information
GLPI: 11.0.2 ( => /var/www/glpi) Installation mode: DOCKER Current language: de_DE Source Integrity: 1 files changed D: install/install.php
Server
Operating system: Linux e442b8bf81a1 6.12.57+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1 (2025-11-05) x86_64PHP: 8.4.14 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, apcu, bcmath, Phar, exif, gd, intl, ldap, mysqli, redis, soap, sodium, zip, Zend OPcacheSetup: disable_functions="" max_execution_time="30" max_input_vars="1000" memory_limit="128M" post_max_size="8M"
session.cookie_secure="0" session.cookie_httponly="1" session.cookie_samesite="Strict" session.save_handler="files"
upload_max_filesize="2M"Web server: Apache ()
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Database:
Server Software: MySQL Community Server - GPL
Server Version: 9.5.0
Server SQL Mode: STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
Parameters: glpi@db:3306/glpi
Host info: db via TCP/IP
Requirements:
PHP version (8.4.14) 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, simplexml, tokenizer, 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 (9.5.0) is supported.
The log file has been created successfully.
Write access to
/var/glpi/files/_cache has been validated.
Write access to /var/glpi/files/_cron has been validated.
Write access to /var/glpi/files has been validated.
Write access to /var/glpi/files/_graphs has been validated.
Write access to /var/glpi/files/_lock has been validated.
Write access to /var/glpi/files/_pictures has been validated.
Write access to /var/glpi/files/_plugins has been validated.
Write access to /var/glpi/files/_rss has been validated.
Write access to /var/glpi/files/_sessions has been validated.
Write access to /var/glpi/files/_tmp has been validated.
Write access to /var/glpi/files/_uploads has been validated.Sessions configuration is secured.
exif extension is installed
ldap 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/glpi/marketplace has been validated.
Timezones seems loaded in database.
GLPI constants
GLPI_ROOT: "/var/www/glpi"
GLPI_VERSION: "11.0.2"
GLPI_SCHEMA_VERSION: "11.0.2@ea2dbba0e1edbf5128d73bdb23c2c9b9f68468ba"
GLPI_FILES_VERSION: "11.0.2-e6b8e30d"
GLPI_MIN_PHP: "8.2"
GLPI_MAX_PHP: "8.5"
GLPI_YEAR: "2025"
GLPI_I18N_DIR: "/var/www/glpi/locales"
GLPI_CONFIG_DIR: "/var/glpi/config"
GLPI_VAR_DIR: "/var/glpi/files"
GLPI_MARKETPLACE_DIR: "/var/glpi/marketplace"
GLPI_LOG_DIR: "/var/glpi/logs"
GLPI_INSTALL_MODE: "DOCKER"
GLPI_ENVIRONMENT_TYPE: "production"
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST: ["^\n (http|https|feed)://!$&'()+,;=:@]|%[0-9A-Fa-f]{2}) )* # a path\n
# 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\-._\
(?:\? (?:[\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_NETWORK_MAIL: "glpi@teclib.com"
GLPI_NETWORK_SERVICES: "https://services.glpi-network.com"
GLPI_MARKETPLACE_ENABLE: 3
GLPI_MARKETPLACE_PRERELEASES: false
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_LOG_LVL: "warning"
GLPI_SKIP_UPDATES: false
GLPI_STRICT_ENV: false
GLPI_AJAX_DASHBOARD: "1"
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_CENTRAL_WARNINGS: "1"
GLPI_SYSTEM_CRON: false
GLPI_TEXT_MAXSIZE: "4000"
GLPI_WEBHOOK_ALLOW_RESPONSE_SAVING: "0"
GLPI_WEBHOOK_CRA_MANDATORY: false
GLPI_ALTCHA_MODE: "interactive"
GLPI_ALTCHA_MAX_NUMBER: 50000
GLPI_ALTCHA_EXPIRATION_INTERVAL: "PT20M"
GLPI_DOC_DIR: "/var/glpi/files"
GLPI_CACHE_DIR: "/var/glpi/files/_cache"
GLPI_CRON_DIR: "/var/glpi/files/_cron"
GLPI_GRAPH_DIR: "/var/glpi/files/_graphs"
GLPI_LOCAL_I18N_DIR: "/var/glpi/files/_locales"
GLPI_LOCK_DIR: "/var/glpi/files/_lock"
GLPI_PICTURE_DIR: "/var/glpi/files/_pictures"
GLPI_PLUGIN_DOC_DIR: "/var/glpi/files/_plugins"
GLPI_RSS_DIR: "/var/glpi/files/_rss"
GLPI_SESSION_DIR: "/var/glpi/files/_sessions"
GLPI_TMP_DIR: "/var/glpi/files/_tmp"
GLPI_UPLOAD_DIR: "/var/glpi/files/_uploads"
GLPI_INVENTORY_DIR: "/var/glpi/files/_inventories"
GLPI_THEMES_DIR: "/var/glpi/files/_themes"
GLPI_PLUGINS_DIRECTORIES: ["/var/glpi/marketplace","/var/www/glpi/plugins"]
GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/"
GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/marketplace/"
LDAP Verzeichnisse
Server: 'ldaps://dcrz01.mkb-mmv.de',
Port: '636',
BaseDN: 'dc=mkb-mmv,dc=de',
Connection filter: '(
|(&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(memberof=CN=GPM365-Advanced,OU=M365Office,OU=Anwendungen,OU=Gruppen,DC=mkb-mmv,DC=de))(&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(memberof=CN=GPM365-Standard,OU=M365
- Office,OU=Anwendungen,OU=Gruppen,DC=mkb-mmv,DC=de)))',
RootDN: 'cn=zz-glpi,ou=Dienstekonten,dc=mkb-mmv,dc=de',
Use TLS: none
SQL Replikationen
Not active
Notifications
Way of sending emails: SMTP(smtp://xxx:25?verify_peer=0)
Plugins list
fields Name: Additional fields Version: 1.23.2 State: Aktiv
Install Method: Marketplace
behaviors Name: Behaviours Version: 3.0.1 State: Installiert / nicht aktiviert
Install Method: Marketplace
datainjection Name: Data injection Version: 2.15.3 State: Aktiv
Install Method: Marketplace
glpiinventory Name: GLPI Inventory Version: 1.6.4 State: Aktiv
Install Method: Marketplace
pdf Name: Print to pdf Version: 4.1.1 State: Aktiv
Install Method: Marketplace
Anything else?
No response