Skip to content

counters component struggles with internal link with parameters #72

@floriangantner

Description

@floriangantner

Describe the bug
The counters-section component (recently refactored with the internal-link-service) can only handle links/paths without parameters.
If they contain some parameter it will lead to broken links.
This might be the case, when you want to link to some search configuration.

To Reproduce
Steps to reproduce the behavior:

  1. configure in cris-sections.xml some counter element linking to some search configuration.
<bean
	class="org.dspace.layout.CrisLayoutCountersComponent.CounterSettings">
	<property name="discoveryConfigurationName"
		value="orgunits" />
	<property name="label" value="orgunits" />
	<property name="icon" value="fas fa-body fa-3x" />
	<property name="link" value="/search?configuration=orgunits" />
</bean>
  1. The link on the counters-section component (hovering the link in the browser) seems to be correct, but
  2. The search ends at search%3Fconfiguration%3Dorgunits

Expected behavior
We expect the counter component to render links with parameters correctly and set these as [queryParams].

Related work
Some solution could be to let the internal-link.service.ts parse the router and take the queryparams from there, as previously suggested in https://github.com/4Science/dspace-angular/pull/26/files#diff-069da7b29cd19e55cfa6983bf87a194e1af5f2cae79a012e222e03817df93212L69.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions