Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with individual and Family lists #4904

Closed
ddrury opened this issue Nov 8, 2023 · 8 comments
Closed

Error with individual and Family lists #4904

ddrury opened this issue Nov 8, 2023 · 8 comments
Labels
bug confirmed bug

Comments

@ddrury
Copy link
Contributor

ddrury commented Nov 8, 2023

Have just updated my test system to the latest code (6e80021) and I now get the following messages for both the Individual & Family list pages

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

and if I go back to the previous page I see a number of messages: There are no individuals with the surname ““ (I guess each message corresponds to a redirect attempt)

UPDATE: Seems to only fail when called from "My page" If called from an individuals page then it works

@fisharebest
Copy link
Owner

Dang. I know what I've done, without looking at the code.

@fisharebest fisharebest added the bug confirmed bug label Nov 8, 2023
@fisharebest
Copy link
Owner

Actually no - I can't reproduce this. What is the link that you are following from "My page"?

@ddrury
Copy link
Contributor Author

ddrury commented Nov 9, 2023

demo

@ddrury
Copy link
Contributor Author

ddrury commented Nov 9, 2023

I've realised that this fails whenever there is no surname parameter on the calling url. See attached image. I arrived on this page by selecting the individual list from my own details page, but now selecting G (for example) results in a URL with no surname parameter and we see the same problem
demo1

@ddrury
Copy link
Contributor Author

ddrury commented Nov 9, 2023

Changing line 219 of app\Module\IndividualListModule.php to if ($surname !== '' && !array_key_exists($surname, $all_surns)) { seems to solve the problem.

@fisharebest
Copy link
Owner

That was the fix I had in mind for my first comment. But couldn't reproduce the error. Will have another look later.

@ddrury
Copy link
Contributor Author

ddrury commented Nov 9, 2023

I think my solution above is back to front in that you need to fail when there is no surname parameter, maybe valid urls within webtrees should always have a surname parameter of some sort

@fisharebest
Copy link
Owner

All my test trees contain at least one individual without a surname. Hence the array_key_exist check always passed, even when $surname === ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants