Avoid config pollution when a plugin lookup fails on a non-existent id - #3421
Merged
Conversation
… non-existent plugin id
zoic21
approved these changes
Jul 14, 2026
Mips2648
reviewed
Jul 20, 2026
Mips2648
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Reported on the Jeedom community forum:
plugin::byId()callsforceDisablePlugin()on every failed lookup, even when the id was never a real plugin (e.g. a caller usingbyId()combined with try/catch as an "is this plugin installed" check, which is a legitimate pattern).forceDisablePlugin()unconditionally wrote anactive=0config row for that id, a write side effect in what amounts to a read/existence check.Fix
plugin::forceDisablePlugin()now only writes theactive=0row when the id was already marked active. This removes the write side effect for ids that were never real plugins, while still disabling a plugin that was genuinely active and became unresolvable.