Skip to content

Fix - Remove stale glpi_plugin_order_profiles relation declaration - #602

Merged
MyvTsv merged 3 commits into
mainfrom
fix/order-profile-stale-relation-declaration
Sep 10, 2026
Merged

MyvTsv merged 3 commits into
mainfrom
fix/order-profile-stale-relation-declaration

Conversation

@RomainLvr

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !46164
  • Here is a brief description of what this PR does

Summary

plugin_order_getDatabaseRelations() still declares a relation between glpi_profiles and glpi_plugin_order_profiles, but that table no longer exists: PluginOrderProfile::install() migrates its data to glpi_profilerights and drops the table.

As a result, deleting any GLPI profile while the order plugin is active triggers a fatal error, since core's cleanRelationData() tries to query a table that doesn't exist:

RuntimeException: MySQL query error: Table 'glpi_plugin_order_profiles'
doesn't exist (1146) in SQL query "SELECT * FROM glpi_plugin_order_profiles
WHERE profiles_id = 'X'"

Fix

Remove the obsolete glpi_profiles entry from plugin_order_getDatabaseRelations().

@RomainLvr RomainLvr self-assigned this Sep 9, 2026
@MyvTsv
MyvTsv merged commit 139957e into main Sep 10, 2026
3 checks passed
@MyvTsv
MyvTsv deleted the fix/order-profile-stale-relation-declaration branch September 10, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants