geneweb
geneweb copied to clipboard
Empty search leads to navigator HTTP ERROR 400
In v6.xx, Gwd was answering to an empty search m=S&p=&n=
with “Incorrect request”.
We now have a navigator answer
I see three possible solutions:
- Restore the error message from gwd.
- Add a some Javascript on the form to disable the submit button when inputs are empty.
- Redirect to the new file 400-en.html (Error 400) (and translate all of them).
Restore the error message from gwd.
What was the error message before?
I think it should not be an HTTP error and should be a simple empty (or the list of persons in the base?) page instead
in fix-rl, I have added an optionnal error message to Hutil.incorrect_request:
| None -> Hutil.incorrect_request conf ~comment:"Missing fn and sn"
the resulting page is:
Translations and embelishments possible.
There are plenty of calls to incorrect_request
which would deserve some explanations!!
It's the old answer, I'm ok with it but I still think we loose time doing this. It would be better if we couldn't go further when search is empty (we gain one up to two gwd requests and time for users). For this, I'd prefer the js solution!
I notice that Geneanet gives “Requête incorrecte (400)” inside their template.