DSpace / dspace-angular

DSpace User Interface built on Angular.io
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
135 stars 433 forks source link

Mapped collection themes are never displayed when viewing an item #3223

Open alexklbuckley opened 3 months ago

alexklbuckley commented 3 months ago

Describe the bug

We have seen this bug on DSpace 7.4 (and this may be on other versions too) when an item has a owning collection AND a mapped collection.

If both the owning and mapped collections each have their own theme defined in the config.*.yml we have noticed that the theme for the owning collection is always displayed, never the theme for the mapped collection.

To Reproduce

Steps to reproduce the behavior:

  1. Create two collections in DSpace: CollectionA and CollectionB

  2. In your config.*.yml add the following theme config (so default theme is dspace, except for one collection):

    • name: uuid:
    • name: dspace
  3. Set the following for an item:

    • Owning collection = CollectionA
    • Mapped collection = CollectionB
  4. View the item in DSpace Angular and notice that the default dspace theme is displayed, not the specific CollectionB theme

Expected behavior

When an item can either use the default theme (that applies for it's owning collection) or the specific theme of its mapped collection. Then the specific theme of it's mapped collection should be prioritised.

So in the steps to reproduce, we would expect the specific theme of CollectionB would be displayed when you view the item.

Related work

alexklbuckley commented 3 months ago

We have a patchset that addresses this bug. We will push a matching pull request for this issue in the coming days.