fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
463 stars 299 forks source link

Error after used "date phrase" #4944

Closed hartenthaler closed 7 months ago

hartenthaler commented 8 months ago

In the Forum a user showed that he is using

0 @F9098@ FAM
1 HUSB @I26161@
1 WIFE @I26160@
1 MARR
2 DATE (../../....)

The DATE is legal GEDCOM because GEDCOM 5.5.1 says

DATE_VALUE:= {Size=1:35}
[
<DATE> |
<DATE_PERIOD> |
<DATE_RANGE>|
<DATE_APPROXIMATED> |
INT <DATE> (<DATE_PHRASE>) |
(<DATE_PHRASE>)
]

So it is not ok that webtrees shows the marriage event with an error flag and the comment ( after death)

fisharebest commented 8 months ago

See my comment in the forum. I cannot reproduce this. Can you provide a GEDCOM that does?

hartenthaler commented 8 months ago

wtcce(I31071).ged.txt Look at the person "Stief GC5 Irgendwas".

fisharebest commented 8 months ago
0 HEAD
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
1 CHAR UTF-8
1 FILE dates.ged
0 @I26160@ INDI
1 NAME aaa /AAA/
2 GIVN aaa
2 SURN AAA
1 SEX F
1 BIRT
2 DATE 28 MAY 1928
1 DEAT
2 DATE 24 JAN 2021
1 FAMS @F9098@
1 FAMC @F3352@
0 @I26161@ INDI
1 NAME bbb /BBB/
2 GIVN bbb
2 SURN BBB
1 SEX M
1 BIRT
2 DATE 29 AUG 1921
1 FAMS @F9098@
0 @F3352@ FAM
1 CHIL @I26160@
1 MARR
2 DATE 13 OCT 1926
0 @F9098@ FAM
1 HUSB @I26161@
1 WIFE @I26160@
1 MARR
2 DATE (../../....)
0 TRLR
arbor95 commented 8 months ago

see pull request #4946

you can enter any text within paranthesis. So no error should be thrown. but you can also enter a single slash on input or ../../.... without paranthesis, what will be either ignored or made empty on input. So, the (internal) result may be an empty string, forcing (wrong) to show the text ( after death) and the warning icon. That is what I corrected in #4946 .

fisharebest commented 7 months ago

Fixed by #4946