fisharebest / webtrees

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

Lists for Families or Individuals with "Surname prefix" included within /<name>/ #4872

Closed arbor95 closed 10 months ago

arbor95 commented 10 months ago

have a look at in "live demo dev". You see following Indi:

Screenshot_20230901-234442_Chrome

clicking the List for Individual you can see her surname to select (as de Marteaux) under First Letter "M"

Screenshot_20230901-234536_Chrome

But clicking onto the surname changes the selection to First Letter of surname to "D" without result.

Screenshot_20230901-234601_Chrome

JustCarmen commented 10 months ago

I can confirm this issue. In the Netherlands surnames with prefixes are very common. For example this list containing surnames starting with the letter 'G': https://wijzijnfamilie.nl/tree/wijzijnfamilie/individual-list?alpha=G&show_marnm= It contains a lot of surnames with prefixes starting with 'Van'. Clicking on the link opens the alphabet under the letter 'V' (instead of 'G') and then shows an empty table without any results.

arbor95 commented 10 months ago

I could solve this problem by changing surnames-table.phtml in resources/views/lists line 63 from <a href="<?= e($module->listUrl($tree, ['surname' => $surname] + $params)) ?>" class="ut"><?= e($surname) ?></a> to <a href="<?= e($module->listUrl($tree, ['surname' => $surn] + $params)) ?>" class="ut"><?= e($surname) ?></a>

This will change the links query-parameter surname from the cases-sensitive surname variant to the uppercase one:

"de Marteaux" to "MARTEAUX"

I did not check, if this change is to be adapted for the surnames-tag-cloud.phtml and the surnames-column-list.phtml too !?.

JustCarmen commented 10 months ago

I could solve this problem by changing surnames-table.phtml in resources/views/lists line 63 from <?= e($surname) ?> to <?= e($surname) ?>

This will change the links query-parameter surname from the cases-sensitive surname variant to the uppercase one:

"de Marteaux" to "MARTEAUX"

Thanks. This works.

fisharebest commented 10 months ago

@arbor95 - thanks for the fix.