Open floriangantner opened 6 months ago
Describe the bug
Navigating on some cris system leads to repetitive reloads of the layout when surfing entities page from referenced entities because the resolved itemurl is hard redirected. This impact the user experience
To Reproduce Steps to reproduce the behavior:
2023.02.00
Expected behavior We expect the page not to be loaded again when accessing the site with some browser.
Related work The metadata-link-view build the route link using /items/uuid
/items/uuid
https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/shared/metadata-link-view/metadata-link-view.component.html#L8
The item-page.resolver uses some new behaviour https://github.com/4Science/dspace-angular/commit/0564b8e55a842081cfbca18981254af71d4264c8#
if thisRoute is not itemRoute (e.g. /items/uuid != entitites/sometype/uuid) https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/item-page/item-page.resolver.ts#L55
entitites/sometype/uuid
it redirects hard to /entities/sometype/uuid https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/item-page/item-page.resolver.ts#L58
/entities/sometype/uuid
Possible Solutions: return the redirect behaviour for browser or change the metadata-link-view component to use the ItemPageRoute.
Describe the bug
Navigating on some cris system leads to repetitive reloads of the layout when surfing entities page from referenced entities because the resolved itemurl is hard redirected. This impact the user experience
To Reproduce Steps to reproduce the behavior:
2023.02.00
for example https://tore.tuhh.de/homeExpected behavior We expect the page not to be loaded again when accessing the site with some browser.
Related work The metadata-link-view build the route link using
/items/uuid
https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/shared/metadata-link-view/metadata-link-view.component.html#L8
The item-page.resolver uses some new behaviour https://github.com/4Science/dspace-angular/commit/0564b8e55a842081cfbca18981254af71d4264c8#
if thisRoute is not itemRoute (e.g.
/items/uuid
!=entitites/sometype/uuid
) https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/item-page/item-page.resolver.ts#L55it redirects hard to
/entities/sometype/uuid
https://github.com/4Science/dspace-angular/blob/4d707bfa96eaec9b8ffb99e5e469c522fc225f85/src/app/item-page/item-page.resolver.ts#L58Possible Solutions: return the redirect behaviour for browser or change the metadata-link-view component to use the ItemPageRoute.