Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counters component struggles with internal link with parameters #72

Open
floriangantner opened this issue Feb 12, 2024 · 0 comments
Open
Labels

Comments

@floriangantner
Copy link

floriangantner commented Feb 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant