Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal webtrees error when Desendants chart is installed #37

Closed
krmcelhinney opened this issue Aug 1, 2023 · 4 comments
Closed

Fatal webtrees error when Desendants chart is installed #37

krmcelhinney opened this issue Aug 1, 2023 · 4 comments

Comments

@krmcelhinney
Copy link

Describe the bug
A clear and concise description of what the bug is.
When I manually install the webtrees-desendants-chart - it fails to run and produces a very long error message, before I get to the webtrees screens.

To Reproduce
Steps to reproduce the behavior:

  1. Manually copy Descentants Chart code to modules_v4 directorty.
  2. I have installed fan chart and pedigree chart the same way and they work fine.

Expected behavior
I expected descendants chart to work, but webtrees produces very long error, I have just discovered that if I scroll down many pages beyond the error webtrees is still running, but the descendants chart is not in the menu.

Screenshots

Screenshot (11)
Screenshot (10)

Desktop (please complete the following information):

  • Chrome (latest)
  • Webtrees version - 2.1.17
  • Version of descendants chart 1.4.0 (Latest)

Additional context
I get the following error message (when I delete the module the site goes back to normal)

Fatal error in module: webtrees-descendants-chart
Error: Call to undefined method Fisharebest\Webtrees\Registry::container() in /home/mcelhinn/public_html/family/modules_v4/webtrees-descendants-chart/module.php:25 Stack trace: #0 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(735): include() #1 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(709): Fisharebest\Webtrees\Services\ModuleService::load() #2 [internal function]: Fisharebest\Webtrees\Services\ModuleService::Fisharebest\Webtrees\Services{closure}() #3 /home/mcelhinn/public_html/family/vendor/illuminate/collections/Collection.php(695): array_map() #4 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(718): Illuminate\Support\Collection->map() #5 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(630): Fisharebest\Webtrees\Services\ModuleService->customModules() #6 /home/mcelhinn/public_html/family/app/Cache.php(60): Fisharebest\Webtrees\Services\ModuleService->Fisharebest\Webtrees\Services{closure}() #7 /home/mcelhinn/public_html/family/vendor/symfony/cache/Adapter/ArrayAdapter.php(84): Fisharebest\Webtrees\Cache::Fisharebest\Webtrees{closure}() #8 /home/mcelhinn/public_html/family/app/Cache.php(61): Symfony\Component\Cache\Adapter\ArrayAdapter->get() #9 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(663): Fisharebest\Webtrees\Cache->remember() #10 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(581): Fisharebest\Webtrees\Services\ModuleService->all() #11 /home/mcelhinn/public_html/family/app/Http/Middleware/UseLanguage.php(84): Fisharebest\Webtrees\Services\ModuleService->findByInterface() #12 /home/mcelhinn/public_html/family/app/Http/Middleware/UseLanguage.php(63): Fisharebest\Webtrees\Http\Middleware\UseLanguage->languages() #13 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process() #14 /home/mcelhinn/public_html/family/app/Http/Middleware/UseSession.php(78): Middleland\Dispatcher->handle() #15 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process() #16 /home/mcelhinn/public_html/family/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher->handle() #17 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process() #18 /home/mcelhinn/public_html/family/app/Http/Middleware/UseDatabase.php(122): Middleland\Dispatcher->handle() #19 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process() #20 /home/mcelhinn/public_html/family/app/Http/Middleware/BadBotBlocker.php(287): Middleland\Dispatcher->handle() #21 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process() #22 /home/mcelhinn/public_html/family/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle() #23 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process() #24 /home/mcelhinn/public_html/family/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle() #25 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process() #26 /home/mcelhinn/public_html/family/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle() #27 /home/mcelhinn/public_html/family/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process() #28 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process() #29 /home/mcelhinn/public_html/family/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle() #30 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process() #31 /home/mcelhinn/public_html/family/app/Http/Middleware/BaseUrl.php(73): Middleland\Dispatcher->handle() #32 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process() #33 /home/mcelhinn/public_html/family/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle() #34 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process() #35 /home/mcelhinn/public_html/family/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle() #36 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process() #37 /home/mcelhinn/public_html/family/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle() #38 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process() #39 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle() #40 /home/mcelhinn/public_html/family/app/Webtrees.php(275): Middleland\Dispatcher->dispatch() #41 /home/mcelhinn/public_html/family/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch() #42 /home/mcelhinn/public_html/family/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest() #43 {main}
× Fatal error in module: webtrees-descendants-chart
Error: Call to undefined method Fisharebest\Webtrees\Registry::container() in /home/mcelhinn/public_html/family/modules_v4/webtrees-descendants-chart/module.php:25 Stack trace: #0 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(735): include() #1 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(709): Fisharebest\Webtrees\Services\ModuleService::load() #2 [internal function]: Fisharebest\Webtrees\Services\ModuleService::Fisharebest\Webtrees\Services{closure}() #3 /home/mcelhinn/public_html/family/vendor/illuminate/collections/Collection.php(695): array_map() #4 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(718): Illuminate\Support\Collection->map() #5 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(630): Fisharebest\Webtrees\Services\ModuleService->customModules() #6 /home/mcelhinn/public_html/family/app/Cache.php(60): Fisharebest\Webtrees\Services\ModuleService->Fisharebest\Webtrees\Services{closure}() #7 /home/mcelhinn/public_html/family/vendor/symfony/cache/Adapter/ArrayAdapter.php(84): Fisharebest\Webtrees\Cache::Fisharebest\Webtrees{closure}() #8 /home/mcelhinn/public_html/family/app/Cache.php(61): Symfony\Component\Cache\Adapter\ArrayAdapter->get() #9 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(663): Fisharebest\Webtrees\Cache->remember() #10 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(581): Fisharebest\Webtrees\Services\ModuleService->all() #11 /home/mcelhinn/public_html/family/app/Http/Middleware/UseLanguage.php(84): Fisharebest\Webtrees\Services\ModuleService->findByInterface() #12 /home/mcelhinn/public_html/family/app/Http/Middleware/UseLanguage.php(63): Fisharebest\Webtrees\Http\Middleware\UseLanguage->languages() #13 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process() #14 /home/mcelhinn/public_html/family/app/Http/Middleware/UseSession.php(78): Middleland\Dispatcher->handle() #15 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process() #16 /home/mcelhinn/public_html/family/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher->handle() #17 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process() #18 /home/mcelhinn/public_html/family/app/Http/Middleware/UseDatabase.php(122): Middleland\Dispatcher->handle() #19 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process() #20 /home/mcelhinn/public_html/family/app/Http/Middleware/BadBotBlocker.php(287): Middleland\Dispatcher->handle() #21 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process() #22 /home/mcelhinn/public_html/family/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle() #23 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process() #24 /home/mcelhinn/public_html/family/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle() #25 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process() #26 /home/mcelhinn/public_html/family/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle() #27 /home/mcelhinn/public_html/family/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process() #28 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process() #29 /home/mcelhinn/public_html/family/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle() #30 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process() #31 /home/mcelhinn/public_html/family/app/Http/Middleware/BaseUrl.php(73): Middleland\Dispatcher->handle() #32 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process() #33 /home/mcelhinn/public_html/family/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle() #34 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process() #35 /home/mcelhinn/public_html/family/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle() #36 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process() #37 /home/mcelhinn/public_html/family/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle() #38 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process() #39 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle() #40 /home/mcelhinn/public_html/family/app/Webtrees.php(275): Middleland\Dispatcher->dispatch() #41 /home/mcelhinn/public_html/family/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch() #42 /home/mcelhinn/public_html/family/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest() #43 {main}
× Fatal error in module: webtrees-descendants-chart
Error: Call to undefined method Fisharebest\Webtrees\Registry::container() in /home/mcelhinn/public_html/family/modules_v4/webtrees-descendants-chart/module.php:25 Stack trace: #0 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(735): include() #1 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(709): Fisharebest\Webtrees\Services\ModuleService::load() #2 [internal function]: Fisharebest\Webtrees\Services\ModuleService::Fisharebest\Webtrees\Services{closure}() #3 /home/mcelhinn/public_html/family/vendor/illuminate/collections/Collection.php(695): array_map() #4 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(718): Illuminate\Support\Collection->map() #5 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(630): Fisharebest\Webtrees\Services\ModuleService->customModules() #6 /home/mcelhinn/public_html/family/app/Cache.php(60): Fisharebest\Webtrees\Services\ModuleService->Fisharebest\Webtrees\Services{closure}() #7 /home/mcelhinn/public_html/family/vendor/symfony/cache/Adapter/ArrayAdapter.php(84): Fisharebest\Webtrees\Cache::Fisharebest\Webtrees{closure}() #8 /home/mcelhinn/public_html/family/app/Cache.php(61): Symfony\Component\Cache\Adapter\ArrayAdapter->get() #9 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(663): Fisharebest\Webtrees\Cache->remember() #10 /home/mcelhinn/public_html/family/app/Services/ModuleService.php(581): Fisharebest\Webtrees\Services\ModuleService->all() #11 /home/mcelhinn/public_html/family/app/Http/Middleware/UseLanguage.php(84): Fisharebest\Webtrees\Services\ModuleService->findByInterface() #12 /home/mcelhinn/public_html/family/app/Http/Middleware/UseLanguage.php(63): Fisharebest\Webtrees\Http\Middleware\UseLanguage->languages() #13 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process() #14 /home/mcelhinn/public_html/family/app/Http/Middleware/UseSession.php(78): Middleland\Dispatcher->handle() #15 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process() #16 /home/mcelhinn/public_html/family/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher->handle() #17 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process() #18 /home/mcelhinn/public_html/family/app/Http/Middleware/UseDatabase.php(122): Middleland\Dispatcher->handle() #19 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process() #20 /home/mcelhinn/public_html/family/app/Http/Middleware/BadBotBlocker.php(287): Middleland\Dispatcher->handle() #21 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process() #22 /home/mcelhinn/public_html/family/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle() #23 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process() #24 /home/mcelhinn/public_html/family/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle() #25 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process() #26 /home/mcelhinn/public_html/family/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle() #27 /home/mcelhinn/public_html/family/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process() #28 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process() #29 /home/mcelhinn/public_html/family/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle() #30 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process() #31 /home/mcelhinn/public_html/family/app/Http/Middleware/BaseUrl.php(73): Middleland\Dispatcher->handle() #32 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process() #33 /home/mcelhinn/public_html/family/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle() #34 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process() #35 /home/mcelhinn/public_html/family/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle() #36 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process() #37 /home/mcelhinn/public_html/family/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle() #38 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process() #39 /home/mcelhinn/public_html/family/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle() #40 /home/mcelhinn/public_html/family/app/Webtrees.php(275): Middleland\Dispatcher->dispatch() #41 /home/mcelhinn/public_html/family/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch() #42 /home/mcelhinn/public_html/family/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest() #43 {main}

@krmcelhinney
Copy link
Author

I found that when I upgraded the fan chart and the ancestor chart they both failed with the same message. When I downgraded to the previous version of each of your modules they run fine. So I will leave my website with the previous version for now. It would seem that the upgraded versions of each of your charts now breaks my webtrees. Regards Ken

@magicsunday
Copy link
Owner

Hi,

it looks to me that you don't use the correct version of the module. Head to https://github.com/magicsunday/webtrees-descendants-chart, than click on "Releases", click on "1.4.0" and then click on the file webtrees-descendants -chart.zip (short: https://github.com/magicsunday/webtrees-descendants-chart/releases/download/1.4.0/webtrees-descendants-chart.zip)).

The Registry::container() call is only available in Webtrees 2.2 and in the module itself only in the current development branch.

@magicsunday magicsunday added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Aug 14, 2023
@krmcelhinney
Copy link
Author

I installed version 1.40 and it failed. I have downgraded to 1.30 and it works fine. That's ok. I will wait until webtrees 2.2 is released before I upgrade. Thanks Ken

@zeezhao
Copy link

zeezhao commented Aug 14, 2023

Fyi - note that v1.40 works in webtrees 2.1.17. I have it running locally with no issues on php 7.4.33.
Thanks for the version!
edit:
My installation is a fresh one with only the following modules running:
topola, webtrees-descendants-chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants