hartenthaler / hh_extended_family

webtrees - showing the extended family of an individual (like cousins and uncles, aunts, ...)
GNU General Public License v3.0
23 stars 9 forks source link

Undefined array key #172

Open AlexKalopsia opened 1 year ago

AlexKalopsia commented 1 year ago

I was just editing some individuals (who have a name entry as well as a romanized one). This is how it looks with Extended Family disablled:

image

this specific one (who I added via "Add a mother" was created correctly, but when I try and visit the page I get:

Undefined array key 1 …/modules_v4/hh_extended_family/src/Factory/Objects/ProbandName.php:122
#0 …/modules_v4/hh_extended_family/src/Factory/Objects/ProbandName.php(122): Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(2, 'Undefined array...', '/var/www/webtre...', 122)
#1 …/modules_v4/hh_extended_family/src/Factory/Objects/ProbandName.php(99): Hartenthaler\Webtrees\Module\ExtendedFamily\ProbandName::findNiceNameFromNameParts(Object(Fisharebest\Webtrees\Individual))
#2 …/modules_v4/hh_extended_family/src/Factory/Objects/ProbandName.php(55): Hartenthaler\Webtrees\Module\ExtendedFamily\ProbandName::findNiceNameFromRufnameOrNameParts(Object(Fisharebest\Webtrees\Individual))
#3 …/modules_v4/hh_extended_family/ExtendedFamily.php(166): Hartenthaler\Webtrees\Module\ExtendedFamily\ProbandName::findNiceName(Object(Fisharebest\Webtrees\Individual), true)
#4 …/modules_v4/hh_extended_family/ExtendedFamilyPersonExists.php(71): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamily->constructProband(Object(Fisharebest\Webtrees\Individual))
#5 …/modules_v4/hh_extended_family/ExtendedFamilyTabModule.php(126): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilyPersonExists->__construct(Object(Fisharebest\Webtrees\Individual), Object(stdClass))
#6 …/modules_v4/hh_extended_family/ExtendedFamilyTabModule.php(555): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilyTabModule->personExistsInExtendedFamily(Object(Fisharebest\Webtrees\Individual))
#7 …/resources/views/individual-page-tabs.phtml(20): Hartenthaler\Webtrees\Module\ExtendedFamily\ExtendedFamilyTabModule->isGrayedOut(Object(Fisharebest\Webtrees\Individual))
#8 …/app/View.php(183): include('/var/www/webtre...')
#9 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#10 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make('individual-page...', Array)
#11 …/resources/views/individual-page.phtml(58): view('individual-page...', Array)
#12 …/app/View.php(183): include('/var/www/webtre...')
#13 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#14 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make('individual-page', Array)
#15 …/app/Http/ViewResponseTrait.php(50): view('individual-page', Array)
#16 …/app/Http/RequestHandlers/IndividualPage.php(140): Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage->viewResponse('individual-page', Array)
#17 …/app/Http/Middleware/RequestHandler.php(55): Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage->handle(Object(Nyholm\Psr7\ServerRequest))
#18 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RequestHandler->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#19 …/modules_v4/webtrees-faces/src/Modules/FacesModule.php(98): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#20 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): UksusoFF\WebtreesModules\Faces\Modules\FacesModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#21 …/app/Module/HitCountFooterModule.php(154): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#22 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\HitCountFooterModule->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#23 …/app/Module/CheckForNewVersion.php(122): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#24 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Module\CheckForNewVersion->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#25 …/app/Http/Middleware/CheckCsrf.php(80): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#26 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#27 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#28 …/app/Webtrees.php(275): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#29 …/app/Http/Middleware/Router.php(161): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array)
#30 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\Router->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#31 …/app/Http/Middleware/BootModules.php(60): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#32 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BootModules->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#33 …/app/Http/Middleware/RegisterGedcomTags.php(54): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#34 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\RegisterGedcomTags->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#35 …/app/Http/Middleware/LoadRoutes.php(75): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#36 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\LoadRoutes->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#37 …/app/Http/Middleware/CheckForNewVersion.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#38 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForNewVersion->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#39 …/app/Http/Middleware/UseTransaction.php(45): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#40 …/vendor/illuminate/database/Concerns/ManagesTransactions.php(29): Fisharebest\Webtrees\Http\Middleware\UseTransaction::Fisharebest\Webtrees\Http\Middleware\{closure}(Object(Illuminate\Database\MySqlConnection))
#41 …/app/Http/Middleware/UseTransaction.php(46): Illuminate\Database\Connection->transaction(Object(Closure), 3)
#42 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTransaction->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#43 …/app/Http/Middleware/DoHousekeeping.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#44 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\DoHousekeeping->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#45 …/app/Http/Middleware/UseTheme.php(69): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#46 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseTheme->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#47 …/app/Http/Middleware/CheckForMaintenanceMode.php(51): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#48 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckForMaintenanceMode->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#49 …/app/Http/Middleware/UseLanguage.php(71): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#50 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseLanguage->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#51 …/app/Http/Middleware/UseSession.php(78): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#52 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseSession->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#53 …/app/Http/Middleware/UpdateDatabaseSchema.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#54 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UpdateDatabaseSchema->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#55 …/app/Http/Middleware/UseDatabase.php(122): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#56 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\UseDatabase->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#57 …/app/Http/Middleware/BadBotBlocker.php(279): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#58 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BadBotBlocker->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#59 …/app/Http/Middleware/CompressResponse.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#60 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CompressResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#61 …/app/Http/Middleware/ContentLength.php(40): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#62 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ContentLength->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#63 …/vendor/middlewares/client-ip/src/ClientIp.php(65): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#64 …/app/Http/Middleware/ClientIp.php(47): Middlewares\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#65 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ClientIp->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#66 …/app/Http/Middleware/HandleExceptions.php(90): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#67 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\HandleExceptions->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#68 …/app/Http/Middleware/BaseUrl.php(73): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#69 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\BaseUrl->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#70 …/app/Http/Middleware/ReadConfigIni.php(68): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#71 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\ReadConfigIni->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#72 …/app/Http/Middleware/SecurityHeaders.php(48): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#73 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\SecurityHeaders->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#74 …/app/Http/Middleware/EmitResponse.php(57): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#75 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\EmitResponse->process(Object(Nyholm\Psr7\ServerRequest), Object(Middleland\Dispatcher))
#76 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle(Object(Nyholm\Psr7\ServerRequest))
#77 …/app/Webtrees.php(275): Middleland\Dispatcher->dispatch(Object(Nyholm\Psr7\ServerRequest))
#78 …/app/Webtrees.php(262): Fisharebest\Webtrees\Webtrees::dispatch(Object(Nyholm\Psr7\ServerRequest), Array)
#79 …/index.php(51): Fisharebest\Webtrees\Webtrees->httpRequest()
#80 {main}
hartenthaler commented 1 year ago

This was already reported as #171. The problem is not the married name. It is the birth name. I assume that you are using "1 NAME" or "1 NAME //". Both are illegal GEDCOM but accepted by webtrees. What happens if you delete the birth name? If you don't know it, you should not specify it. But anyway it is a bug in my module to crash in such a situation.