Skip to content

FIX / Clean plugin configuration on uninstall function#1208

Open
Mary-Clb wants to merge 3 commits into
mainfrom
fix-plugin-configuration-deletion-v3
Open

FIX / Clean plugin configuration on uninstall function#1208
Mary-Clb wants to merge 3 commits into
mainfrom
fix-plugin-configuration-deletion-v3

Conversation

@Mary-Clb
Copy link
Copy Markdown

@Mary-Clb Mary-Clb commented Jun 8, 2026

  • 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

  • The plugin uninstallation function was missing the deletion of glpi_configs entries belonging to the plugin.

@Mary-Clb Mary-Clb changed the title clean plugin configuration FIX / Clean plugin configuration on uninstall function Jun 8, 2026
@Mary-Clb Mary-Clb marked this pull request as ready for review June 8, 2026 09:30
Comment thread hook.php Outdated
// clean configuration values
$config = new Config();
$config->deleteByCriteria([
'context' => 'plugin_fields',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI run this SQL query

SELECT COUNT(*) FROM glpi_configs WHERE context = 'plugin:{$plugin_key}'

so

Suggested change
'context' => 'plugin_fields',
'context' => 'plugin:fields',

@Mary-Clb
Copy link
Copy Markdown
Author

Mary-Clb commented Jun 8, 2026

@stonebuzz @Rom1-B can I fix rector error in the CI in this PR ? Or should I open another one

@stonebuzz
Copy link
Copy Markdown
Contributor

@Mary-Clb
Different problems require different pull requests =/

@Mary-Clb Mary-Clb self-assigned this Jun 8, 2026
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