Closed magicsunday closed 9 years ago
This is related to #452 and #413.
I have just submitted some changes to the way we load modules.
We now have a try {} catch {}
block to catch these errors,
Can you tell me if the latest code fixes the problem for you.
Greg, since I pulled the latest changes which includes the new module api I can't get into the admin module list anymore. I keep getting the following error:
Fatal error: Call to a member function getName() on a non-object in C:\xampp\htdocs\webtrees_build\app\Module.php on line 372
Before I merged these changes I disabled all custom modules. But that didn't help. Then I removed all entries from the database and at last I removed all custom modules out of the module directory, because I wasn't sure this error wasn't caused by one of my modules. But I am still getting this error.
Sorry it was caused by a custom module. I forgot one: custom_js which isn't mine. Thats why I overlooked this one in the first place. But only by removing all custom modules I can go into the admin module list.
I had assumed that since line 372 is in a try {} catch {} block
, the error would be caught correctly.
Let me take another look
Try the latest code.
I moved all custom modules back to the module folder to test this out and it is working. I am in now. But the custom modules don't appear in the list anymore and I think this is correct behavior, since they are not yet updated, am I right?
I just tried the latest version (without disabling the custom modules first) and I get this error:
Should those changes have made it possible for me to enter the site without updated modules and is there a guide of what the new API changes mean to custom modules?
@Vytux: to get your modules up and running again it only takes a few modifcations. I will take the Fancy Treeview Module as example to explain:
The first step is not necessary but it is consistent with the naming conventions of the core modules. The name in the second step must be equal to the class name from the first step.
@JustCarmen Thank you. That does indeed work I was a little confused by the app\modules folder though it meant that we need to convert all custom modules into single page versions.
I currently used the module _wooc_singlepagepedigree with the latest dev version of webtrees. Due the massive changes in the class structure the module throws an fatal error while trying to load WT_Module which does not longer exists.
There is no way to disable this plugin using the admin tools. Its only possible to manipulate the database entry in table _wtmodule.
But if disabled the admin page _adminmodules.php fails with an fatal error due Module::getInstalledModules('disabled');
I think there should be a third state "compatible" or something to fully disable plugins/modules which are not compatible with webtrees because if internal changes.