geneweb icon indicating copy to clipboard operation
geneweb copied to clipboard

Empty search leads to navigator HTTP ERROR 400

Open a2line opened this issue 1 year ago • 3 comments

In v6.xx, Gwd was answering to an empty search m=S&p=&n= with “Incorrect request”.

image

We now have a navigator answer image

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). image

a2line avatar Aug 17 '23 15:08 a2line

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

Swrup avatar Aug 18 '23 08:08 Swrup

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: Capture d’écran 2023-08-18 à 13 31 10 Translations and embelishments possible.

There are plenty of calls to incorrect_request which would deserve some explanations!!

hgouraud avatar Aug 18 '23 11:08 hgouraud

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.

a2line avatar Aug 18 '23 12:08 a2line