4Science / dspace-angular

Angular UI for DSpace and DSpace-CRIS. In the dspace-cris-7 branch you can find the extension to support DSpace-CRIS
BSD 3-Clause "New" or "Revised" License
14 stars 28 forks source link

item version link returns 404 error #67

Open qzhao-ulb opened 8 months ago

qzhao-ulb commented 8 months ago

Describe the bug If I visit an item via version number, for example, https://my-instance/items/version/10, it returns 404 not found error.

To Reproduce Steps to reproduce the behavior:

  1. checkout dspace-angular with release dspace-cris-2023.02.00 or dspace-cris-2023.02.01, and start the frontend with the default config.yml
  2. visit http://localhost:4040/entities/publication/3da502b0-259e-424a-9a7a-66694af86f0b/full
  3. click the version 1 in the version history table: http://localhost:4000/items/version/10
  4. or after step 1 type the url http://localhost:4000/items/version/10 in web browse directly
  5. This page will display "404 page not found". Backend received the request /server/api/core/items/search/findByCustomURL?q=version

Expected behavior Item page of this version

Related work none

olli-gold commented 6 months ago

I can confirm, that the item version link in the version history table does not work properly. It also affects DSpace-CRIS 2023.02.02. Since the error message points to the custom URL I guess it's really a DSpace-CRIS related problem rather than one of generic DSpace.

olli-gold commented 6 months ago

Let me add, that we have a workaround for that (which is really ugly, but I wanted to let you know): we have removed the link from the version history table. So it looks like this:

grafik

I will not create a PR for this, because it's really rather a workaround than a real solution. But if someone wants to adopt that anyways: it's just a small change in https://github.com/4Science/dspace-angular/blob/main-cris/src/app/item-page/versions/item-versions.component.html#L35 (or in the lines beyond).