fisharebest / webtrees

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

Bug: personal facts module #4853

Closed ddrury closed 5 months ago

ddrury commented 1 year ago

If the historic facts module has content and is enabled and an individual has no personal facts recorded then the message "There are no facts for this individual." should be displayed.

This doesn't happen because the historic events are included in the personal facts collection.

See this commit

fisharebest commented 1 year ago

Presumably, the same is true of events of relatives/associates.

ddrury commented 1 year ago

No, they are never merged with anything else, it's only the individual facts that get the others merged

        $individual_facts = $individual_facts
            ->merge($family_facts)
            ->merge($relative_facts)
            ->merge($associate_facts)
            ->merge($historic_facts);

I've made a simple fix in https://github.com/fisharebest/webtrees/pull/4854, just add this line before the merge $has_individual_facts = $individual_facts->isNotEmpty(); then include it in the call to the view and test for it in the view

ddrury commented 1 year ago

BTW maybe a good idea to merge into a more appropriate name ($all_facts?)

Later, I've just realised the meaning of your original question, yes you're right content in any of the other collections will affect the outcome (senior moment)

arbor95 commented 5 months ago

Has this been done or is it obsolete?

fisharebest commented 5 months ago

The purpose of this text is simply to prevent a completely empty tab - which could be confusing.

If the historic facts module has content and is enabled and an individual has no personal facts recorded

We only show historic events that occur between the first and last personal event with a date.

So there should never be historic events and no personal events.

If this is happening, then it should be a separate bug report.