Skip to content

MySQL Error: Unknown Column glpi_groups_usersgroups_id When Adding Group or Notifications to Ticket #31

@Sebtmbg

Description

@Sebtmbg

Version
GLPI: 11.0.1
Plugin: Behaviors 3.0.1

Bug description
We encounter a MySQL error when the plugin attempts to add a group or manage notifications for a ticket. The error indicates that the column glpi_groups_usersgroups_id is unknown.

Relevant log output
MySQL query error: Unknown column 'glpi_groups_usersgroups_id' in 'where clause' (1054)
in SQL query "SELECT DISTINCT glpi_users.id AS users_id, glpi_users.language AS language
FROM glpi_groups_users
INNER JOIN glpi_users ON (glpi_groups_users.users_id = glpi_users.id)
INNER JOIN glpi_profiles_users ON (glpi_profiles_users.users_id = glpi_users.id)
INNER JOIN glpi_groups ON (glpi_groups_users.users_id = glpi_users.id)
WHERE glpi_groups_usersgroups_id = '53' AND glpi_groupsis_notify = '1'
AND ((glpi_profiles_users.entities_id = '0' OR (glpi_profiles_users.is_recursive = '1'
AND glpi_profiles_users.entities_id IN ('0'))))".

Full trace:
#0 ./src/DBmysql.php(371): DBmysql->doQuery()
#1 ./src/DBmysqlIterator.php(123): DBmysqlIterator->execute()
#2 ./src/DBmysql.php(1040): DBmysql->request()
#3 ./marketplace/behaviors/src/Ticket.php(1483): GlpiPlugin\Behaviors\Ticket::addForGroup()
#4 ./marketplace/behaviors/src/Ticket.php(339): GlpiPlugin\Behaviors\Ticket::getLastLinkedGroupByType()
#5 ./marketplace/behaviors/src/Ticket.php(169): GlpiPlugin\Behaviors\Ticket::addActionTargets()
#6 ./src/Plugin.php(1719): Plugin::doHook()
#7 ./src/NotificationTarget.php(1385): NotificationTarget->addForTarget()
#8 ./src/NotificationEventAbstract.php(76): NotificationEvent::raiseEvent()
#9 ./src/NotificationEvent.php(200): NotificationEventAbstract::raise()
#10 ./src/CommonITILActor.php(289): CommonITILActor->post_addItem()
#11 ./src/Group_Ticket.php(66): Group_Ticket->post_addItem()
#12 ./src/CommonDBTM.php(1396): CommonITILObject->add()
#13 ./src/CommonITILObject.php(9327): CommonDBTM->update()
#14 ./src/CommonITILObject.php(2350): Ticket->post_updateItem()
#15 ./src/Ticket.php(1370): CommonITILObject->post_updateItem()
#16 ./src/CommonDBTM.php(1811): Ticket->update()
#17 ./front/ticket.form.php(88): CommonDBTM->update()
#18 ./src/Glpi/Controller/LegacyFileLoadController.php(64): require('...')
#19 ./vendor/symfony/http-kernel/HttpKernel.php(181): Glpi\Controller\LegacyFileLoadController->__invoke()
#20 ./vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#21 ./vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle()
#22 ./public/index.php(70): Symfony\Component\HttpKernel\Kernel->handle()

Page URL
https://xxxx/front/ticket.form.php

Steps To Reproduce

  1. Go to an existing ticket.
  2. Add a group or modify the ticket notifications.
  3. Save the ticket.
  4. The MySQL error occurs.

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