vytux-com / vytux_cousins

Cousins tab module for webtrees
13 stars 4 forks source link

An error occurred while accessing a deceased individual while not logged in #18

Closed iyoua closed 2 years ago

iyoua commented 2 years ago

Call to a member function attribute() on null …/modules_v4/vytux_cousins-master/module.php:217
#0 …/modules_v4/vytux_cousins-master/resources/views/tab.phtml(26): Vytux\WebtreesModules\VytuxCousins\VytuxCousinsTabModule->getChildLabel()
#1 …/app/View.php(183): include('/www/wwwroot/ch...')
#2 …/app/View.php(278): Fisharebest\Webtrees\View->render()
#3 …/app/Helpers/functions.php(145): Fisharebest\Webtrees\View::make()
#4 …/modules_v4/vytux_cousins-master/module.php(248): view()
...
vytux-com commented 2 years ago

Are you able to provide the raw gedcom record for this?

At a guess it's probably caused by an individual with no family records? I'll have a look tonight, but it would be good to have some reproducible records so I can test the fix

jpretired commented 2 years ago

I am experiencing the same issue. The raw gedcom record is:

0 @I157@ INDI 1 NAME Vendelín /Prause/ 2 GIVN Vendelín 2 SURN Prause 1 SEX M 1 BIRT 2 DATE 4 APR 1912 2 PLAC Nový Hrádek-Rzy, Královéhradecký, Česko 1 DEAT 2 DATE 5 MAY 1912 2 PLAC Nový Hrádek-Rzy, Královéhradecký, Česko 1 FAMC @F178@

iyoua commented 2 years ago

When viewing a deceased individual without logging in, an error will occur when the person has a cousin, and no error will occur if he does not have a cousin. After logging in, it will display normal.

------------------ 原始邮件 ------------------ 发件人: "vytux-com/vytux_cousins" @.>; 发送时间: 2022年5月26日(星期四) 凌晨5:42 @.>; @.**@.>; 主题: Re: [vytux-com/vytux_cousins] An error occurred while accessing a deceased individual while not logged in (Issue #18)

Are you able to provide the raw gedcom record for this?

At a guess it's probably caused by an individual with no family records? I'll have a look tonight, but it would be good to have some reproducible records so I can test the fix

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

iyoua commented 2 years ago

You can test it at the following website: https://chen.zong.pub/tree/my/individual/X65/chen-pi-hao account number:test password:test1234

vytux-com commented 2 years ago

OK, found the issue and fix is about to be committed, its caused by privacy when some relatives are private and thus the family record gets hidden by webtrees.