glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.32k stars 1.29k forks source link

10.0.8: Can't add new items (answer, task) to a ticket and existing tasks are missing after upgrading #15173

Closed mpsat closed 1 year ago

mpsat commented 1 year ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.8

Bug description

Hello!

After upgrading from 10.0.7 to 10.0.8 we have a big issue which breaks the ticket functionality. No new item kann be added to a ticket. Regardless of the type (answer or task). After submitting the new answer or task, the page is reloaded but the new entry is not saved. Strange enough, also existing tasks are also missing in the timeline.

Seems there must be an issue with database. During the migration scripts there was an error which could be solved using the workaround from [github #15045 ]Issue #15045 : "10.0.8 dev : The shema differs for table "glpi_queuednotifications when i execute php bin/console database:check_schema_integrity"

We see a lot of database related errors in php-errors.log

[2023-07-10 09:57:40] glpiphplog.WARNING:   *** PHP User Warning (512): Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. in /u01/glpi/html/src/DbUtils.php at line 2111
  Backtrace :
  src/DbUtils.php:2111                               trigger_error()
  inc/db.function.php:585                            DbUtils->getDbRelations()
  src/CommonDBTM.php:866                             getDbRelations()
  src/CommonDBTM.php:788                             CommonDBTM->cleanRelationData()
  src/CommonDBTM.php:2068                            CommonDBTM->deleteFromDB()
  src/RuleMatchedLog.php:183                         CommonDBTM->delete()
  src/Inventory/Asset/MainAsset.php:861              RuleMatchedLog->cleanOlddata()
  src/RuleImportAsset.php:969                        Glpi\Inventory\Asset\MainAsset->rulepassed()
  src/Rule.php:1525                                  RuleImportAsset->executeActions()
  src/RuleCollection.php:1640                        Rule->process()
  src/Inventory/Asset/MainAsset.php:573              RuleCollection->processAllRules()
  src/Inventory/Inventory.php:709                    Glpi\Inventory\Asset\MainAsset->handle()
  src/Inventory/Inventory.php:340                    Glpi\Inventory\Inventory->handleItem()
  src/Inventory/Request.php:360                      Glpi\Inventory\Inventory->doInventory()
  src/Inventory/Request.php:90                       Glpi\Inventory\Request->inventory()
  src/Agent/Communication/AbstractRequest.php:359    Glpi\Inventory\Request->handleAction()
  src/Agent/Communication/AbstractRequest.php:271    Glpi\Agent\Communication\AbstractRequest->handleJSONRequest()
  front/inventory.php:92                             Glpi\Agent\Communication\AbstractRequest->handleRequest()
  ...tplace/glpiinventory/front/communication.php:72 include_once()
  marketplace/glpiinventory/index.php:45             include_once()
  public/index.php:82                                require() 

See also here: https://forum.glpi-project.org/viewtopic.php?pid=503031#p503031

Relevant log output

No response

Page URL

No response

Steps To reproduce

Page refreshes and newly created answer or task won't show up.

Your GLPI setup information

Information about system installation and configuration
GLPI 10.0.8 ( => /u01/glpi/html)
Installation mode: TARBALL
Current language:en_GB

Server
 
Operating system: Linux sbgsrvglpi1 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64
PHP 8.1.20 fpm-fcgi (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bz2, calendar, cgi-fcgi, 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, pspell, readline, session, shmop, snmp, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tidy,
    tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="600" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
    upload_max_filesize="2M" 
Software: nginx/1.18.0
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.51
Server Software: Debian 11
    Server Version: 10.5.19-MariaDB-0+deb11u2-log
    Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    Parameters: glpiuser@localhost/glpidb
    Host info: Localhost via UNIX socket

PHP version (8.1.20) is supported.
Sessions configuration is OK.
Allocated memory is sufficient.
mysqli extension is installed.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
curl extension is installed.
gd extension is installed.
intl extension is installed.
zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.5.19) is supported.
No files from previous GLPI version detected.
The log file has been created successfully.
Write access to /u01/glpi/userdata/_cache has been validated.
The directory could not be created in /etc/glpi/.
Write access to /u01/glpi/userdata/_cron has been validated.
Write access to /u01/glpi/userdata has been validated.
Write access to /u01/glpi/userdata/_dumps has been validated.
Write access to /u01/glpi/userdata/_graphs has been validated.
Write access to /u01/glpi/userdata/_lock has been validated.
Write access to /u01/glpi/userdata/_pictures has been validated.
Write access to /u01/glpi/userdata/_plugins has been validated.
Write access to /u01/glpi/userdata/_rss has been validated.
Write access to /u01/glpi/userdata/_sessions has been validated.
Write access to /u01/glpi/userdata/_tmp has been validated.
Write access to /u01/glpi/userdata/_uploads has been validated.

Web server root directory configuration seems safe.
Sessions configuration is secured.
OS and PHP are relying on 64 bits integers.
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, mbstring, sodium.
Write access to /u01/glpi/html/marketplace has been validated.
Timezones seems loaded in database.

GLPI constants
 
GLPI_ROOT: "/u01/glpi/html"
GLPI_CONFIG_DIR: "/etc/glpi/"
GLPI_VAR_DIR: "/u01/glpi/userdata"
GLPI_DOC_DIR: "/u01/glpi/userdata"
GLPI_CRON_DIR: "/u01/glpi/userdata/_cron"
GLPI_DUMP_DIR: "/u01/glpi/userdata/_dumps"
GLPI_GRAPH_DIR: "/u01/glpi/userdata/_graphs"
GLPI_LOCK_DIR: "/u01/glpi/userdata/_lock"
GLPI_PICTURE_DIR: "/u01/glpi/userdata/_pictures"
GLPI_PLUGIN_DOC_DIR: "/u01/glpi/userdata/_plugins"
GLPI_RSS_DIR: "/u01/glpi/userdata/_rss"
GLPI_SESSION_DIR: "/u01/glpi/userdata/_sessions"
GLPI_TMP_DIR: "/u01/glpi/userdata/_tmp"
GLPI_UPLOAD_DIR: "/u01/glpi/userdata/_uploads"
GLPI_CACHE_DIR: "/u01/glpi/userdata/_cache"
GLPI_LOG_DIR: "/var/log/glpi"
GLPI_MARKETPLACE_DIR: "/u01/glpi/html/marketplace"
GLPI_USE_CSRF_CHECK: "1"
GLPI_CSRF_EXPIRES: "7200"
GLPI_CSRF_MAX_TOKENS: "100"
GLPI_USE_IDOR_CHECK: "1"
GLPI_IDOR_EXPIRES: "7200"
GLPI_ALLOW_IFRAME_IN_RICH_TEXT: false
GLPI_SERVERSIDE_URL_ALLOWLIST: ["/^(https?|feed):\\/\\/[^@:]+(\\/.*)?$/"]
GLPI_TELEMETRY_URI: "https://telemetry.glpi-project.org"
GLPI_INSTALL_MODE: "TARBALL"
GLPI_NETWORK_MAIL: "glpi@teclib.com"
GLPI_NETWORK_SERVICES: "https://services.glpi-network.com"
GLPI_MARKETPLACE_ALLOW_OVERRIDE: true
GLPI_MARKETPLACE_MANUAL_DOWNLOADS: true
GLPI_USER_AGENT_EXTRA_COMMENTS: ""
GLPI_DISABLE_ONLY_FULL_GROUP_BY_SQL_MODE: "1"
GLPI_AJAX_DASHBOARD: "1"
GLPI_CALDAV_IMPORT_STATE: 0
GLPI_DEMO_MODE: "0"
GLPI_CENTRAL_WARNINGS: "1"
GLPI_LOCAL_I18N_DIR: "/u01/glpi/userdata/_locales"
GLPI_INVENTORY_DIR: "/u01/glpi/userdata/_inventories"
GLPI_NETWORK_REGISTRATION_API_URL: "https://services.glpi-network.com/api/registration/"
GLPI_MARKETPLACE_PLUGINS_API_URI: "https://services.glpi-network.com/api/marketplace/"
GLPI_I18N_DIR: "/u01/glpi/html/locales"
GLPI_VERSION: "10.0.8"
GLPI_SCHEMA_VERSION: "10.0.8"
GLPI_MARKETPLACE_PRERELEASES: false
GLPI_MIN_PHP: "7.4.0"
GLPI_MAX_PHP: "8.3.0"
GLPI_YEAR: "2023"

Libraries
 
htmlawed/htmlawed version 1.2.14 in (/u01/glpi/html/vendor/htmlawed/htmlawed)
phpmailer/phpmailer version 6.8.0 in (/u01/glpi/html/vendor/phpmailer/phpmailer/src)
simplepie/simplepie version 1.5.8 in (/u01/glpi/html/vendor/simplepie/simplepie/library)
tecnickcom/tcpdf version 6.6.2 in (/u01/glpi/html/vendor/tecnickcom/tcpdf)
michelf/php-markdown in (/u01/glpi/html/vendor/michelf/php-markdown/Michelf)
true/punycode in (/u01/glpi/html/vendor/true/punycode/src)
iamcal/lib_autolink in (/u01/glpi/html/vendor/iamcal/lib_autolink)
sabre/dav in (/u01/glpi/html/vendor/sabre/dav/lib/DAV)
sabre/http in (/u01/glpi/html/vendor/sabre/http/lib)
sabre/uri in (/u01/glpi/html/vendor/sabre/uri/lib)
sabre/vobject in (/u01/glpi/html/vendor/sabre/vobject/lib)
laminas/laminas-i18n in (/u01/glpi/html/vendor/laminas/laminas-i18n/src)
laminas/laminas-servicemanager in (/u01/glpi/html/vendor/laminas/laminas-servicemanager/src)
monolog/monolog in (/u01/glpi/html/vendor/monolog/monolog/src/Monolog)
sebastian/diff in (/u01/glpi/html/vendor/sebastian/diff/src)
donatj/phpuseragentparser in (/u01/glpi/html/vendor/donatj/phpuseragentparser/src/UserAgent)
elvanto/litemoji in (/u01/glpi/html/vendor/elvanto/litemoji/src)
symfony/console in (/u01/glpi/html/vendor/symfony/console)
scssphp/scssphp in (/u01/glpi/html/vendor/scssphp/scssphp/src)
laminas/laminas-mail in (/u01/glpi/html/vendor/laminas/laminas-mail/src/Protocol)
laminas/laminas-mime in (/u01/glpi/html/vendor/laminas/laminas-mime/src)
rlanvin/php-rrule in (/u01/glpi/html/vendor/rlanvin/php-rrule/src)
blueimp/jquery-file-upload in (/u01/glpi/html/vendor/blueimp/jquery-file-upload/server/php)
ramsey/uuid in (/u01/glpi/html/vendor/ramsey/uuid/src)
psr/log in (/u01/glpi/html/vendor/psr/log/Psr/Log)
psr/simple-cache in (/u01/glpi/html/vendor/psr/simple-cache/src)
psr/cache in (/u01/glpi/html/vendor/psr/cache/src)
league/csv in (/u01/glpi/html/vendor/league/csv/src)
mexitek/phpcolors in (/u01/glpi/html/vendor/mexitek/phpcolors/src/Mexitek/PHPColors)
guzzlehttp/guzzle in (/u01/glpi/html/vendor/guzzlehttp/guzzle/src)
guzzlehttp/psr7 in (/u01/glpi/html/vendor/guzzlehttp/psr7/src)
glpi-project/inventory_format in (/u01/glpi/html/vendor/glpi-project/inventory_format/lib/php)
wapmorgan/unified-archive in (/u01/glpi/html/vendor/wapmorgan/unified-archive/src)
paragonie/sodium_compat in (/u01/glpi/html/vendor/paragonie/sodium_compat/src)
symfony/cache in (/u01/glpi/html/vendor/symfony/cache)
html2text/html2text in (/u01/glpi/html/vendor/html2text/html2text/src)
symfony/css-selector in (/u01/glpi/html/vendor/symfony/css-selector)
symfony/dom-crawler in (/u01/glpi/html/vendor/symfony/dom-crawler)
twig/twig in (/u01/glpi/html/vendor/twig/twig/src)
twig/string-extra in (/u01/glpi/html/vendor/twig/string-extra)
symfony/polyfill-ctype not found
symfony/polyfill-iconv not found
symfony/polyfill-mbstring not found
symfony/polyfill-php80 not found
symfony/polyfill-php81 not found
symfony/polyfill-php82 in (/u01/glpi/html/vendor/symfony/polyfill-php82)
league/oauth2-client in (/u01/glpi/html/vendor/league/oauth2-client/src/Provider)
league/oauth2-google in (/u01/glpi/html/vendor/league/oauth2-google/src/Provider)
thenetworg/oauth2-azure in (/u01/glpi/html/vendor/thenetworg/oauth2-azure/src/Provider)

LDAP directories
 
Server: 'ldaps://sbgsrvad2.internal.diel.co.at', Port: '636', BaseDN: 'OU=Digital Elektronik
        GmbH,DC=internal,DC=diel,DC=co,DC=at', Connection filter: '(&(objectClass=user)(objectCategory=person))', RootDN:
        'glpi-service@internal.diel.co.at', Use TLS: none

SQL replicas
 
Not active

Notifications
 
Way of sending emails: SMTP+TLS (anonymous@webmail.internal.diel.co.at)

Plugins list
 
    accounts             Name: Accounts                       Version: 3.0.3      State: Enabled                                 
        Install Method: Marketplace
    activity             Name: Activities                     Version: 3.1.2      State: Installed / not activated               
        Install Method: Marketplace
    actualtime           Name: ActualTime                     Version: 2.1.0      State: Enabled                                 
        Install Method: Marketplace
    fields               Name: Additional fields              Version: 1.20.6     State: Enabled                                 
        Install Method: Marketplace
    advanceddashboard    Name: advanceddashboard              Version: 1.5.0      State: Enabled                                 
        Install Method: Marketplace
    advancedplanning     Name: advancedplanning               Version: 1.1.0      State: Enabled                                 
        Install Method: Marketplace
    news                 Name: Alerts                         Version: 1.12.1     State: Enabled                                 
        Install Method: Marketplace
    approvalbymail       Name: Approval by mail               Version: 2.1.2      State: Enabled                                 
        Install Method: Marketplace
    archisw              Name: Apps structures                Version: 3.0.8      State: Installed / not activated               
        Install Method: Marketplace
    barcode              Name: Barcode                        Version: 2.7.1      State: Enabled                                 
        Install Method: Marketplace
    behaviors            Name: Behaviours                     Version: 2.7.2      State: Installed / not activated               
        Install Method: Marketplace
    branding             Name: Branding                       Version: 1.4.0      State: Enabled                                 
        Install Method: Marketplace
    archibp              Name: Business Processes             Version: 2.0.3      State: Installed / not activated               
        Install Method: Marketplace
    positions            Name: Cartography                    Version: 6.0.2      State: Enabled                                 
        Install Method: Marketplace
    cmdb                 Name: CMDB                           Version: 3.0.3      State: Installed / not activated               
        Install Method: Marketplace
    collaborativetools   Name: Collaborative tools            Version: 1.2.2      State: Enabled                                 
        Install Method: Marketplace
    consumables          Name: Consumable request             Version: 2.0.0      State: Installed / not activated               
        Install Method: Marketplace
    costs                Name: Costs                          Version: 3.0.1      State: Installed / not activated               
        Install Method: Marketplace
    datainjection        Name: Data injection                 Version: 2.13.2     State: Enabled                                 
        Install Method: Marketplace
    manageentities       Name: Entities portal                Version: 4.0.3      State: Installed / not activated               
        Install Method: Marketplace
    escalade             Name: Escalation                     Version: 2.9.0      State: Enabled                                 
        Install Method: Marketplace
    financialreports     Name: Financial reports              Version: 3.0.0      State: Installed / not activated               
        Install Method: Marketplace
    formcreator          Name: Form Creator                   Version: 2.13.6     State: Enabled                                 
        Install Method: Marketplace
    archifun             Name: Functional Areas               Version: 2.2.9      State: Installed / not activated               
        Install Method: Marketplace
    gantt                Name: gantt                          Version: 1.0.4      State: Enabled                                 
        Install Method: Marketplace
    gappessentials       Name: Gapp Essentials                Version: 2.1.2      State: Installed / not activated               
        Install Method: Marketplace
    glpiinventory        Name: GLPI Inventory                 Version: 1.2.2      State: Enabled                                 
        Install Method: Marketplace
    holiday              Name: Holidays                       Version: 1.2.0      State: Enabled                                 
        Install Method: Marketplace
    resources            Name: Human Resources                Version: 3.0.4      State: Installed / not activated               
        Install Method: Marketplace
    sccm                 Name: Interface - SCCM               Version: 2.4.3      State: Installed / not activated               
        Install Method: Marketplace
    geninventorynumber   Name: Inventory number generation    Version: 2.8.3      State: Enabled                                 
        Install Method: Marketplace
    addressing           Name: IP Adressing                   Version: 3.0.1      State: Enabled                                 
        Install Method: Marketplace
    itilcategorygroups   Name: ItilCategory Groups            Version: 2.5.1      State: Enabled                                 
        Install Method: Marketplace
    ldaptools            Name: LDAP Tools                     Version: 0.0.3      State: Enabled                                 
        Install Method: Marketplace
    mailanalyzer         Name: Mail Analyzer                  Version: 3.0.0      State: Enabled                                 
        Install Method: Manual
    mreporting           Name: More Reporting                 Version: 1.8.2      State: Enabled                                 
        Install Method: Marketplace
    satisfaction         Name: More satisfaction              Version: 1.6.1      State: Enabled                                 
        Install Method: Marketplace
    moreticket           Name: More ticket                    Version: 1.7.3      State: Installed / not activated               
        Install Method: Marketplace
    oauthimap            Name: Oauth IMAP                     Version: 1.4.3      State: Installed / not activated               
        Install Method: Marketplace
    oauthsso             Name: oauthsso                       Version: 1.9.9      State: Installed / not activated               
        Install Method: Marketplace
    genericobject        Name: Objects management             Version: 2.14.3     State: Enabled                                 
        Install Method: Marketplace
    order                Name: Orders management              Version: 2.10.4     State: Enabled                                 
        Install Method: Marketplace
    additionalalerts     Name: Others alerts                  Version: 2.4.0      State: Enabled                                 
        Install Method: Marketplace
    phpsaml              Name: PHP SAML                       Version: 1.2.1      State: Enabled                                 
        Install Method: Manual
    badges               Name: Plaketten                      Version: 3.0.0      State: Enabled                                 
        Install Method: Marketplace
    printercounters      Name: Printer counters               Version: 2.0.0      State: Enabled                                 
        Install Method: Marketplace
    purchaserequest      Name: Purchase request               Version: 3.0.1      State: Enabled                                 
        Install Method: Marketplace
    releases             Name: Releases                       Version: 2.0.3      State: Enabled                                 
        Install Method: Marketplace
    localeoverride       Name: Rename GLPI strings            Version: 1.1.7      State: Enabled                                 
        Install Method: Marketplace
    screenshot           Name: Screenshot                     Version: 2.0.2      State: Enabled                                 
        Install Method: Marketplace
    splitcat             Name: Split categories               Version: 1.5.3      State: Installed / not activated               
        Install Method: Marketplace
    stab                 Name: Split Timeline Action Buttons  Version: 1.1.2      State: Enabled                                 
        Install Method: Marketplace
    statecheck           Name: Statecheck Rules               Version: 2.3.9      State: Installed / not activated               
        Install Method: Marketplace
    manufacturersimports Name: Suppliers imports              Version: 3.0.5      State: Enabled                                 
        Install Method: Marketplace
    tag                  Name: Tag Management                 Version: 2.11.3     State: Installed / not activated               
        Install Method: Marketplace
    taskdrop             Name: TaskDrop                       Version: 2.0.0      State: Installed / not activated               
        Install Method: Marketplace
    tasklists            Name: Tasks list                     Version: 2.0.3      State: Installed / not activated               
        Install Method: Marketplace
    timelineticket       Name: Timeline of tickets            Version: 10.0+1.1   State: Installed / not activated               
        Install Method: Marketplace
    treeview             Name: Tree view                      Version: 1.10.2     State: Enabled                                 
        Install Method: Marketplace
    typology             Name: Typologies                     Version: 3.0.0      State: Installed / not activated               
        Install Method: Marketplace
    useditemsexport      Name: Used items export              Version: 2.5.1      State: Installed / not activated               
        Install Method: Marketplace
    webresources         Name: Web Resources                  Version: 2.0.3      State: Installed / not activated               
        Install Method: Marketplace
    webapplications      Name: Webanwendungen                 Version: 4.0.1      State: Not installed                           
        Install Method: Marketplace

Locales overrides

Anything else?

No response

cedric-anne commented 1 year ago

Hi,

  1. Private followup/tasks issue is fixed by #15138 .
  2. glpi_queuednotifications.event missing column is fixed by #15135.
  3. Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. message is related to accounts plugin, you should open an issue on their repository.