fisharebest / webtrees

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

Individual lists showing incorrect results #4879

Closed andrewgoz closed 10 months ago

andrewgoz commented 10 months ago

This is using webtrees 2.1.17

On my webtrees, selecting "M" individuals shows a large selection:

http://mncp.scss.dyndns.info/tree/mncp.ged/individual-list?show=surn&show_marnm=yes&alpha=M

If I click on "McARTHUR (19)" instead of getting the expected list of 19 results I get no results and the heading indicates the search was for "MCARTHUR" (uppercase 'C').

http://mncp.scss.dyndns.info/tree/mncp.ged/individual-list?alpha=M&falpha=&show=indi&show_all=&show_all_firstnames=&show_marnm=yes&surname=MCARTHUR

If instead of "McARTHUR (19)" I click on "MACARTHUR (1)" immediately above it, I don't get the expected single "MACARTHUR" result, instead I get a combined list of "MACARTHUR" (1 result) and "McARTHUR" (19 results - the ones I wanted previously) for a total of 20 results.

http://mncp.scss.dyndns.info/tree/mncp.ged/individual-list?surname=MACARTHUR&show=indi&alpha=M&show_marnm=yes

I expect webtrees to show 1 result when clicking on "MACARTHUR (1)" and 19 results when clicking on "McARTHUR (19)".

Edit: I have Administrator access to this site, and the results do not change whether I am logged in or not.

JustCarmen commented 10 months ago

I think this is related to #4872. This was fixed earlier this week and will be in the next release. You could try to load the 5 files from this commit to see if it makes any difference.

arbor95 commented 10 months ago

The McARTHUR and MACARTHUR are grouped together. Both names appear in the header of the list of persons or families. But if the Lists "Surname list style" is set to "list" or "tag cloud" in preferences, one can not see that the surnames are grouped. They are listed as separate surnames. Stuart Gregory and Andrew mean, that this surnames should never be grouped. For me grouping is ok, but it should be visible in each of the selected list styles. May be webtrees should be expanded to select grouping for surname-lists or not (in preferences).

@JustCarmen

I think this is related to #4872. This was fixed earlier this week and will be in the next release. You could try to load the 5 files from this commit to see if it makes any difference.

I talked with Stuart, There is no direkt relation to #4872, so not the solution.

andrewgoz commented 10 months ago

I believe #4872 relates to surname prefixes (SPFX), which are not present in any of the names in my report.

I had thought the issue might be some sort of case sensitivity after noting that the results page for "McARTHUR" was actually headed "MCARTHUR", but after adding a test individual with an all-caps "MCARTHUR", clicking on the new "MCARTHUR (1)" produces an empty result list (same as "McARTHUR (19)"), while clicking on "MACARTHUR (1)" now produces a list with 21 results and has a heading "MACARTHUR/MCARTHUR/McARTHUR".

andrewgoz commented 10 months ago

One more comment. I remembered I had a test webtrees 2.1.16 active and checked its behaviour. Both "MACARTHUR" and "McARTHUR" produce the exact same combined results page for "MACARTHUR/McARTHUR".

That is much better. My preference would be to not combine names, but at least the "McARTHUR" page showed something.

fisharebest commented 10 months ago

There are several issues with the logic on this page.

Originally, we used MySQL collation rules to match letters with accents, upper/lower case.

However, this doesn't work for other databases (and not all languages). So, the logic was rewritten to work in PHP.

I've rewritten it again. But before submitting the fix, I need to add lots more test-scripts to make sure we don't introduce any regressions during future updates.