Add a interface for the plugins and also some exception throwing when plugins are not loaded correctly. This should fix all of our issues where loading a bean calls a fatal error.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | bean_loading-1196774-3.patch | 5.41 KB | indytechcook |
| #5 | bean_loading-1196774-2.patch | 5.07 KB | indytechcook |
| #3 | bean_loading-1196774-1.patch | 5.08 KB | indytechcook |
| #1 | bean_loading-1196774.patch | 5.18 KB | indytechcook |
Comments
Comment #1
indytechcook commentedAttached patch
Comment #2
mrfelton commentedNice. However its giving me a WSOD:
[22-Jun-2011 21:04:00] PHP Fatal error: Declaration of bean_default::view() must be compatible with that of bean_type_plugin_interface::view() in /Users/tom/workspace/alumni/profiles/alumni/modules/contrib/bean/plugins/base.inc on line 80
Comment #3
indytechcook commentedTry this one
Comment #4
mrfelton commentedDifferent, but similar problem this time:
[22-Jun-2011 21:18:22] PHP Fatal error: Declaration of bean_default::form() must be compatible with that of bean_type_plugin_interface::form() in /Users/tom/workspace/alumni/profiles/alumni/modules/contrib/bean/plugins/base.inc on line 80
Comment #5
indytechcook commentedThe problem is with the new type casting. It's a good idea but it's a major API change that isn't necessary.
Here is an updated patch.
Comment #6
mrfelton commentedGetting there. The previous errors have gone, and beans display ok. But, if I try to access the bean type admin page (/admin/structure/block/types) I get the following:
[22-Jun-2011 21:33:33] PHP Fatal error: Interface 'bean_type_plugin_interface' not found in /Users/tom/workspace/alumni/profiles/alumni/modules/contrib/bean/plugins/base.inc on line 8
Same issue for the bean add page at block/add
Comment #7
indytechcook commentedyeah, that's because the code registry needs to be updated. I'll write an update hook.
Comment #8
indytechcook commentedOk, here is the patch with an update statement to clear the registry.
Comment #9
mrfelton commentedGood, that seems to do the trick. I'd reword te comment for the update hook though from "Implements hook_update_N" to something that describes what is happening in the update, since that string is displayed to users in update.php.
Comment #10
indytechcook commentedGood Call. I committed.