webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

fix issue #5019: forward from old branch list url

Open BertKoor opened this issue 1 year ago • 3 comments

I've removed the part

'x' .

which caused the issue. No idea how that creeped in.

BertKoor avatar Aug 15 '24 09:08 BertKoor

Hi Bert. Thanks for this.

Yes - this fixes the problem.

But there is a slightly deeper problem here.

We have two levels of redirect. The middle one is old/unused and can be deleted.

The first redirect is here:

https://github.com/fisharebest/webtrees/blob/01b92fd6b02917bce4b544b1295f7954fc92e3ce/app/Http/RequestHandlers/RedirectBranchesPhp.php#L61-L68

The second is here:

https://github.com/fisharebest/webtrees/blob/01b92fd6b02917bce4b544b1295f7954fc92e3ce/app/Module/BranchesListModule.php#L160-L172

What I think we need is this:

  • The first redirect should be to the final URL (e.g. $module->getListUrl()).
  • The function getPageAction() needs deleting.

Do you want to update the PR to do this?

fisharebest avatar Aug 15 '24 09:08 fisharebest

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 33.85%. Comparing base (01b92fd) to head (f2e1e40). Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
app/Module/BranchesListModule.php 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5020   +/-   ##
=========================================
  Coverage     33.85%   33.85%           
  Complexity    11400    11400           
=========================================
  Files          1178     1178           
  Lines         47562    47562           
=========================================
  Hits          16103    16103           
  Misses        31459    31459           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 15 '24 09:08 codecov[bot]

Do you want to update the PR to do this?

Sure, I'll have a go at that somewhere next week.

BertKoor avatar Aug 17 '24 19:08 BertKoor

I'll make the other change.

fisharebest avatar Sep 12 '24 09:09 fisharebest