Opened 3 years ago
Closed 3 years ago
#1454 closed Enhancement (fixed)
Bad plugin should not crash site
| Reported by: | cash | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.7 |
| Component: | Core | Version: | 1.6 |
| Severity: | minor | Keywords: | |
| Cc: | brettp | Difficulty: |
Description
As a plugin developer, I'm very tired of the misconfigured plugin exception crashing people's sites. I get this sort of interaction with every release:
User: I installed your plugin and it crashed my site. Misconfigured Plugin! Everyone, do not download this plugin!!!
I have a patch that does the following:
- throws the exception when the plugin is enabled and disables the plugin automatically
- adds some text to the error message to tell the admin that the plugin has been disabled and please check the wiki for diagnosing the problem
Attachments (1)
Change History (7)
comment:1 Changed 3 years ago by brettp
- Milestone changed from Elgg 1.7 to Elgg 1.8
comment:2 Changed 3 years ago by brettp
- Milestone changed from Elgg 1.8 to Elgg 1.7
comment:3 Changed 3 years ago by cash
It's a really simple patch. I'll attach it tonight. Is this something for before the beta is released or between beta and final release?
comment:4 Changed 3 years ago by brettp
This will go in before the beta is released. If you attach it tonight I'll pull it in tonight or tomorrow. Thanks.
comment:5 Changed 3 years ago by cash
I modified the code in late Dec and tested with the latest svn at that point. I haven't tested with the latest svn but it is quite simple and should work as is.
Changed 3 years ago by cash
comment:6 Changed 3 years ago by brettp
- Resolution set to fixed
- Status changed from new to closed
(In [svn:3841]) Fixes #1454: Applied Cash's patch. Bad plugins are automatically disabled and a notice is displayed instead of breaking the site.

If the patch applies cleanly to current SVN let's get it in 1.7. If you don't have time to try, could you attach the patch here and I'll have a go at it?