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

Error: <opening a person's record with shared places #112

Closed
webtrees-pesz opened this issue Apr 2, 2022 · 11 comments
Closed

Error: <opening a person's record with shared places #112

webtrees-pesz opened this issue Apr 2, 2022 · 11 comments

Comments

@webtrees-pesz
Copy link
Contributor

I get an error message when I open the record of a person with a shared place (including GOV data) in one of the events. The error appears only in the role of a visitor. If I am logged in as a member, the error does not appear.
When I roll back the log, the error occurs the first time at 1st of March.

assert(): RuntimeException in …/app/Services/TreeService.php:137 Stack trace: #0 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(201): Fisharebest\Webtrees\Services\TreeService-&gt;find(19) #1 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(222): Cissee\WebtreesExt\Services\SearchServiceExt-&gt;Cissee\WebtreesExt\Services{closure}(Object(stdClass)) #2 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(147): Cissee\WebtreesExt\Services\SearchServiceExt-&gt;paginateQuery(Object(Illuminate\Database\Query\Builder), Object(Closure), Object(Closure), 0, 9223372036854775806) #3 …/modules_v4/vesta_shared_places/SharedPlacesModule.php(594): Cissee\WebtreesExt\Services\SearchServiceExt-&gt;searchLocationsEOL(Array, Array) #4 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(373): Cissee\Webtrees\Module\SharedPlaces\SharedPlacesModule-&gt;gov2loc(Object(Vesta\Model\GovReference), Object(Fisharebest\Webtrees\Tree)) vesta-webtrees-2-custom-modules/vesta_gov4webtrees#5 …/app/Cache.php(59): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::Vesta\Hook\HookInterfaces{closure}() vesta-webtrees-2-custom-modules/vesta_personal_facts#3 …/vendor/symfony/cache/Adapter/ArrayAdapter.php(63): Fisharebest\Webtrees\Cache::Fisharebest\Webtrees{closure}(Object(Symfony\Component\Cache\CacheItem), true) vesta-webtrees-2-custom-modules/vesta_gov4webtrees#7 …/app/Cache.php(60): Symfony\Component\Cache\Adapter\ArrayAdapter-&gt;get('4e0c4f84976801b...', Object(Closure)) #8 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(387): Fisharebest\Webtrees\Cache-&gt;remember('Vesta\Hook\Hook...', Object(Closure)) #9 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(419): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::gov2plac(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), Object(Vesta\Model\GovReference), Object(Fisharebest\Webtrees\Tree)) #10 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsService.php(132): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::placPplac(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), Object(Vesta\Model\PlaceStructure), Object(Illuminate\Support\Collection)) #11 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsService.php(229): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsService-&gt;resolvePlace(Object(Vesta\Model\PlaceStructure), Array) #12 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsModule.php(167): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsService-&gt;getAdditionalFacts(Object(Cissee\WebtreesExt\IndividualExt), true) #13

@ric2016 ric2016 transferred this issue from vesta-webtrees-2-custom-modules/vesta_gov4webtrees Apr 2, 2022
@ric2016
Copy link
Contributor

ric2016 commented Apr 2, 2022

I cannot reproduce this. The error seems to indicate a non-public tree.

Looking at on this code block (commented out), I think we have been here before. If you comment in this block, you'll hopefully get additional information in the php error log that may help to finally resolve this issue.

Line 195 misses a backslash though, it has to be adjusted to:

} catch (\Exception $ex) {

@webtrees-pesz
Copy link
Contributor Author

Hello Richard,
I inserted the backslash but I get an error message again.

BTW: The tree is not private. See mustermann.genonline.de - Max Manfred Mustermann

assert(): RuntimeException in …/app/Services/TreeService.php:137
Stack trace:
#0 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(201): Fisharebest\Webtrees\Services\TreeService->find(19)
#1 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(222): Cissee\WebtreesExt\Services\SearchServiceExt->Cissee\WebtreesExt\Services{closure}(Object(stdClass))
#2 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(147): Cissee\WebtreesExt\Services\SearchServiceExt->paginateQuery(Object(Illuminate\Database\Query\Builder), Object(Closure), Object(Closure), 0, 9223372036854775806)
#3 …/modules_v4/vesta_shared_places/SharedPlacesModule.php(594): Cissee\WebtreesExt\Services\SearchServiceExt->searchLocationsEOL(Array, Array)
#4 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(373): Cissee\Webtrees\Module\SharedPlaces\SharedPlacesModule->gov2loc(Object(Vesta\Model\GovReference), Object(Fisharebest\Webtrees\Tree))
#5 …/app/Cache.php(59): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::Vesta\Hook\HookInterfaces{closure}()
#6 …/vendor/symfony/cache/Adapter/ArrayAdapter.php(63): Fisharebest\Webtrees\Cache::Fisharebest\Webtrees{closure}(Object(Symfony\Component\Cache\CacheItem), true)
#7 …/app/Cache.php(60): Symfony\Component\Cache\Adapter\ArrayAdapter->get('4e0c4f84976801b...', Object(Closure))
#8 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(387): Fisharebest\Webtrees\Cache->remember('Vesta\Hook\Hook...', Object(Closure))
#9 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(419): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::gov2plac(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), Object(Vesta\Model\GovReference), Object(Fisharebest\Webtrees\Tree))
#10 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsService.php(132): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::placPplac(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), Object(Vesta\Model\PlaceStructure), Object(Illuminate\Support\Collection))
#11 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsService.php(229): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsService->resolvePlace(Object(Vesta\Model\PlaceStructure), Array)
#12 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsModule.php(167): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsService->getAdditionalFacts(Object(Cissee\WebtreesExt\IndividualExt), true)
#13 …/modules_v4/vesta_personal_facts/IndividualFactsTabModuleExtended.php(214): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule->hFactsTabGetAdditionalFacts(Object(Cissee\WebtreesExt\IndividualExt))
#14 [internal function]: Cissee\Webtrees\Module\PersonalFacts\IndividualFactsTabModuleExtended->Cissee\Webtrees\Module\PersonalFacts{closure}(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), '_vesta_research...')
#15 …/vendor/illuminate/support/Collection.php(1120): array_map(Object(Closure), Array, Array)
#16 …/modules_v4/vesta_personal_facts/IndividualFactsTabModuleExtended.php(215): Illuminate\Support\Collection->map(Object(Closure))
#17 …/modules_v4/vesta_personal_facts/patchedWebtrees/Module/IndividualFactsTabModule_2x.php(163): Cissee\Webtrees\Module\PersonalFacts\IndividualFactsTabModuleExtended->additionalFacts(Object(Cissee\WebtreesExt\IndividualExt))
#18 …/app/Module/ModuleTabTrait.php(116): Cissee\WebtreesExt\Module\IndividualFactsTabModule_2x->getTabContent(Object(Cissee\WebtreesExt\IndividualExt))
#19 …/app/Http/RequestHandlers/ModuleAction.php(88): Cissee\WebtreesExt\Module\IndividualFactsTabModule_2x->getTabAction(Object(Nyholm\Psr7\ServerRequest))
#20 …/app/Http/Middleware/WrapHandler.php(83): Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction->handle(Object(Nyholm\Psr7\ServerRequest))

@ric2016
Copy link
Contributor

ric2016 commented Apr 2, 2022

I inserted the backslash but I get an error message again.

If you get the same error message as before, you apparently did not comment in the code block? (i.e. remove lines 192 and 200)

Anyway, this is just for debugging. Check your php error log: It should contain a line starting with "private tree?"

@webtrees-pesz
Copy link
Contributor Author

Next try:

private tree? 19 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php:198
#0 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(222): Cissee\WebtreesExt\Services\SearchServiceExt->Cissee\WebtreesExt\Services{closure}(Object(stdClass))
#1 …/modules_v4/vesta_shared_places/patchedWebtrees/Services/SearchServiceExt.php(147): Cissee\WebtreesExt\Services\SearchServiceExt->paginateQuery(Object(Illuminate\Database\Query\Builder), Object(Closure), Object(Closure), 0, 9223372036854775806)
#2 …/modules_v4/vesta_shared_places/SharedPlacesModule.php(594): Cissee\WebtreesExt\Services\SearchServiceExt->searchLocationsEOL(Array, Array)
#3 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(373): Cissee\Webtrees\Module\SharedPlaces\SharedPlacesModule->gov2loc(Object(Vesta\Model\GovReference), Object(Fisharebest\Webtrees\Tree))
#4 …/app/Cache.php(59): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::Vesta\Hook\HookInterfaces{closure}()
#5 …/vendor/symfony/cache/Adapter/ArrayAdapter.php(63): Fisharebest\Webtrees\Cache::Fisharebest\Webtrees{closure}(Object(Symfony\Component\Cache\CacheItem), true)
#6 …/app/Cache.php(60): Symfony\Component\Cache\Adapter\ArrayAdapter->get('4e0c4f84976801b...', Object(Closure))
#7 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(387): Fisharebest\Webtrees\Cache->remember('Vesta\Hook\Hook...', Object(Closure))
#8 …/modules_v4/vesta_common/HookInterfaces/FunctionsPlaceUtils.php(419): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::gov2plac(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), Object(Vesta\Model\GovReference), Object(Fisharebest\Webtrees\Tree))
#9 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsService.php(132): Vesta\Hook\HookInterfaces\FunctionsPlaceUtils::placPplac(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), Object(Vesta\Model\PlaceStructure), Object(Illuminate\Support\Collection))
#10 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsService.php(229): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsService->resolvePlace(Object(Vesta\Model\PlaceStructure), Array)
#11 …/modules_v4/vesta_research_suggestions/ResearchSuggestionsModule.php(167): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsService->getAdditionalFacts(Object(Cissee\WebtreesExt\IndividualExt), true)
#12 …/modules_v4/vesta_personal_facts/IndividualFactsTabModuleExtended.php(214): Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule->hFactsTabGetAdditionalFacts(Object(Cissee\WebtreesExt\IndividualExt))
#13 [internal function]: Cissee\Webtrees\Module\PersonalFacts\IndividualFactsTabModuleExtended->Cissee\Webtrees\Module\PersonalFacts{closure}(Object(Cissee\Webtrees\Module\ResearchSuggestions\ResearchSuggestionsModule), '_vesta_research...')
#14 …/vendor/illuminate/support/Collection.php(1120): array_map(Object(Closure), Array, Array)
#15 …/modules_v4/vesta_personal_facts/IndividualFactsTabModuleExtended.php(215): Illuminate\Support\Collection->map(Object(Closure))
#16 …/modules_v4/vesta_personal_facts/patchedWebtrees/Module/IndividualFactsTabModule_2x.php(163): Cissee\Webtrees\Module\PersonalFacts\IndividualFactsTabModuleExtended->additionalFacts(Object(Cissee\WebtreesExt\IndividualExt))
#17 …/app/Module/ModuleTabTrait.php(116): Cissee\WebtreesExt\Module\IndividualFactsTabModule_2x->getTabContent(Object(Cissee\WebtreesExt\IndividualExt))

@webtrees-pesz
Copy link
Contributor Author

Error-Log:

[Sat Apr 02 19:22:47.366404 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: private tree? 19, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366455 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: Illuminate\Support\Collection Object, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366461 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: (, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366465 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: [items:protected] => Array, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366470 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: (, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366475 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: [Mustermann] => Fisharebest\Webtrees\Tree Object, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366479 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: (, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366484 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: [id:Fisharebest\Webtrees\Tree:private] => 7, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366489 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: [name:Fisharebest\Webtrees\Tree:private] => Mustermann, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366494 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: [title:Fisharebest\Webtrees\Tree:private] => Familie Mustermann, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366499 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: [fact_privacy:Fisharebest\Webtrees\Tree:private] => Array, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann
[Sat Apr 02 19:22:47.366503 2022] [fcgid:warn] [pid 2217235:tid 140465621886720] [client 5.56.180.160:55583] mod_fcgid: stderr: (, referer: https://mustermann.genonline.de/index.php?route=%2Ftree%2FMustermann%2Findividual%2FI1%2FMax-Manfred-Mustermann

@webtrees-pesz
Copy link
Contributor Author

The error occurs in the tree "Familie Mustermann". 1 day before the error appears the first time, I created a new tree with a similar name: "Familie Mustermann (HB)". The second tree is not public. Is there a relation?

@ric2016
Copy link
Contributor

ric2016 commented Apr 2, 2022

You error log is hard to read. Stripped of irrelevant info, it shows this:

private tree? 19
Illuminate\Support\Collection Object
[items:protected] => Array
[Mustermann] => Fisharebest\Webtrees\Tree Object
[id:Fisharebest\Webtrees\Tree:private] => 7
[name:Fisharebest\Webtrees\Tree:private] => Mustermann
[title:Fisharebest\Webtrees\Tree:private] => Familie Mustermann
[fact_privacy:Fisharebest\Webtrees\Tree:private] => Array

The rest seems to be cut off.

Anyway I think i have found the cause of the issue: Apparently you have multiple trees with the same shared place.
When resolving a GOV-Id to a shared place, the result is cached - Ignoring the tree.
Later requests use the cached result regardless of the tree. This will be easy to fix.

Edit: This isn't the cause after all - That cache is per-request.

@ric2016 ric2016 transferred this issue from vesta-webtrees-2-custom-modules/vesta_shared_places Apr 2, 2022
@ric2016
Copy link
Contributor

ric2016 commented Apr 2, 2022

So I haven't found the cause for this after all - Somewhere along the call the trees get mixed up, probably because they both contain the same xref (which is allowed, of course).

We'll either have to add more error_log statements throughout the code, or you can send me your GEDCOM files (including the private trees) and I can try to reproduce this locally.

Does disabling the research suggestions module resolve the issue?

@webtrees-pesz
Copy link
Contributor Author

I will send you the GEDCOM files via PM.
If I disable the research suggestions, every thing runs fine.

@ric2016
Copy link
Contributor

ric2016 commented Apr 3, 2022

Thanks for your help - I was able to reproduce the issue and will now be able to fix it.

@ric2016 ric2016 transferred this issue from vesta-webtrees-2-custom-modules/vesta_common Apr 3, 2022
@ric2016
Copy link
Contributor

ric2016 commented Apr 3, 2022

Fixed in latest release 2.0.23+2.1.0-beta.2.0.0.

@ric2016 ric2016 closed this as completed Apr 3, 2022
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

2 participants