View Issue Details

IDProjectCategoryView StatusLast Update
0035208mantisbtplug-inspublic2025-01-06 08:02
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Target Version2.28.0Fixed in Version2.28.0 
Summary0035208: Improve error handling for invalid plugins
Description

The diagnostics for invalid plugins in the Plugins Management page (manage_plugin_page.php) introduced in 0026142 needs some improvement.

  • Plugins hooking undeclared events are not detected, and if Mantis is configured to hide warnings (which is the case by default) then the only way to find out about the problem is to run the Admin Checks with verbose error messages
  • The error message for an invalid plugin with a missing class should be more detailed.
TagsNo tags attached.

Relationships

related to 0026142 closeddregad Improve handling of invalid / incorrectly installed plugins 
related to 0035209 closeddregad An invalid plugin can cause errors in other plugins' files 
related to 0035207 resolveddregad Early inline warnings mess up with page layout 

Activities

Related Changesets

MantisBT: master 2cf4437c

2024-12-27 19:01

dregad


Details Diff
Return false when Plugin init fails

When a Plugin fails to initialize due to hooking a non-existing Event,
the APIs now return false, allowing the caller to catch the problem.

For backwards compatibility, since these functions previously had no
return type, we consider a return value of null as true.

Fixes 0035208
Affected Issues
0035208
mod - core/classes/MantisPlugin.class.php Diff File
mod - core/event_api.php Diff File
mod - core/plugin_api.php Diff File

MantisBT: master 90c13845

2024-12-27 19:09

dregad


Details Diff
Catch failing Plugin event hooks and report them

New InvalidPlugin child class: MissingHooksPlugin

Fixes 0035208
Affected Issues
0035208
mod - core/classes/MantisPlugin.class.php Diff File
add - core/classes/MissingHooksPlugin.class.php Diff File
mod - core/plugin_api.php Diff File
mod - lang/strings_english.txt Diff File

MantisBT: master 43635e7e

2024-12-27 19:15

dregad


Details Diff
Improve status messages for MissingClassPlugin

Fixes 0035208
Affected Issues
0035208
mod - core/classes/MissingClassPlugin.class.php Diff File
mod - lang/strings_english.txt Diff File

MantisBT: master b2b33a0f

2024-12-27 19:17

dregad


Details Diff
Do not throw error for MissingClass plugin

We don't want to throw an error for an invalid plugin when displaying
manage_plugin_page.php, as this is the place where information about the
problem is displayed.

Fixes 0035208
Affected Issues
0035208
mod - core/plugin_api.php Diff File