webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

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

Open BertKoor opened this issue 1 year ago • 1 comments
trafficstars

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 avatar Aug 15 '24 07:08 BertKoor

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

BertKoor avatar Aug 15 '24 09:08 BertKoor

Closed by #5020

fisharebest avatar Sep 13 '24 21:09 fisharebest