fisharebest / webtrees

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

Redirected list branches from old url adds 'x' in front of surname #5019

Closed BertKoor closed 1 day ago

BertKoor commented 1 month ago

Spotted an issue after my long overdue migration. When an old url to a list of branches gets redirected, an 'x' is put at the front of the surname.

Analysis: when getting the old url /branches.php?ged=MyTree&surname=Doe it redirects to /module/branches_list/Page/MyTree?soundex_dm=&soundex_std=&surname=Doe which in turn redirects to /tree/MyTree/branches/xDoe?soundex_dm=0&soundex_std=0

I found the issue is in function getPageAction of /app/Module/BranchesListModule.php :

'surname'     => 'x' . Validator::queryParams($request)->string('surname'), 

I'm preparing a PR to fix this myself

BertKoor commented 1 month ago

Here's the PR with a fix: https://github.com/fisharebest/webtrees/pull/5020

I have verified that an old url without a name eg /branches.php?ged=MyTree eventually redirects to /tree/MyTree/branches?soundex_dm=0&soundex_std=0

fisharebest commented 1 day ago

Closed by #5020