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

Navigation links do not work on a search result page when the SPARQL query returns a 404 error #693

Closed
tfrancart opened this issue Jan 25, 2018 · 5 comments · Fixed by #1195

Comments

@tfrancart
Copy link
Contributor

At which URL did you encounter the problem?

http://erato.sparna.fr/authority/legal-subject-theme/fr/search?clang=fr&q=this.returns.no.results

What steps will reproduce the problem?

  1. Go to http://erato.sparna.fr/authority
  2. Select any vocabulary
  3. Make a full text search for a dummy keyword that returns no results
  4. Click on any navigation link in the navigation bar (Vocabularies, About, Feedback)

What is the expected output? What do you see instead?

The links start with "/", like "/about", and are not pointing to the correct path. They sould be prepended by the request language, I think.
It works when the search return some results : http://erato.sparna.fr/authority/legal-subject-theme/fr/search?clang=fr&q=service

However I don't have the same behavior when looking at other skosmos deployments, like vocabularies.unesco.org or finto.fi.

What am I missing ?

@henriyli henriyli added this to the Next Tasks milestone Jan 26, 2018
@henriyli
Copy link
Collaborator

Hmm interesting, I think you are correct. The navigation links are indeed missing the request language, which causes the links to break down.

I'll try to figure out why the request languages are missing.

@henriyli henriyli self-assigned this Jan 26, 2018
@henriyli
Copy link
Collaborator

The "Pas de vocabulaires sur le serveur !" text makes me wonder if the vocabularies.ttl parsing fails for some reason. It also seems that the Request object returns "" when language, content language or the vocabulary getters are used.

Are there any clues in the apache error log?

@tfrancart
Copy link
Contributor Author

Actually I am debugging this right now, it seems a SPARQL query in the search fails, which actually causes a 404 error to be returned : https://github.com/NatLibFi/Skosmos/blob/master/controller/WebController.php#L437
Yet however the normal search result template is displayed, but not all the required request properties are present, like the language.

@osma
Copy link
Member

osma commented Mar 12, 2018

@tfrancart Is this still a problem or can the issue be closed?

@tfrancart
Copy link
Contributor Author

This should be rephrased as : "Navigation links do not work on a search result page when the SPARQL query returns a 404 error". This is somehow related to the line pointed in the previous comment.

@tfrancart tfrancart changed the title Navigation links do not work on a search result page with no results Navigation links do not work on a search result page when the SPARQL query returns a 404 error Mar 12, 2018
@osma osma closed this as completed in #1195 Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants