hochschule-darmstadt / openartbrowser

Exploring the world of arts using open data
http://openartbrowser.org/
MIT License
40 stars 10 forks source link

Search Results - Title and Links wrong #520

Closed vinoroidski closed 3 years ago

vinoroidski commented 3 years ago

Describe the bug When a user uses the search bar to conduct a search on openartbrowser, they receive a search results page with the title "Artwork" and search results which include elements of all categories (i.e. not just "Artworks" - for example "Genres", "Artists", "Locations", etc.). The links of returned elements are broken in a few cases as we statically assign an "artwork" prefix to the URL of our returned elements. This should be changed so as to ensure that the title of the page is "All Search Results" and all links of returned elements work correctly.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'openartbrowser.org'
  2. Search 'blond' with the search bar at the top of the page (press Enter after entering the text - do not select any of the drop down options)
  3. See that the title of the page is "Artworks" while all types of elements are returned.
  4. Hover over the different results and find elements which are "Motives", like "Blond hair".
  5. Click on the element and observe the link containing "artwork" in its URL.

Expected behavior The title of the page should be changed for all languages to conform to "All Search Results" and all links for returned elements should resolve to the chosen element.

vinoroidski commented 3 years ago

Better fix found: I simply removed the header for the carousel on search-result.component.html which was as follows: <app-slider [items]="sliderItems" i18n-heading="Artworks label@@artworks" heading="Artworks">

to

<app-slider [items]='sliderItems' i18n-heading="Results label@@results">

We already write "Search Results" at the top of the page and do not need an additional heading for the Carousel element.

I also changed the link generation as discussed - now the links for all elements in Search Results are correct.

Results

Before image before

After image after