question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] RouterLink is using RouteAlias value instead of Route value in 14.5.1

See original GitHub issue

Describe the bug

A view class with a route something and a route alias "" (empty) was passed into RouterLink to create a router-link anchor.

Before 14.5.1, the href would be something, but after upgrading to 14.5.1, it has become empty. This is causing some of our BDD tests to fail.

This is only an issue when the RouteAlias value is empty. If the RouteAlias is a non-empty value, the routerlink uses the route value as expected.

To Reproduce Steps to reproduce the behavior:

  1. Create a class as follow
@Route(value = "something", layout = MainLayout.class)
@RouteAlias(value = "", layout = MainLayout.class)
public class SomethingView extends VerticalLayout {
  /* some content */
}
  1. Create a router link and use it on a view
RouterLink routerLink = new RouterLink(name, navigationTarget, parameter);
  1. Check the href of the anchor

Expected behavior An anchor with something as href.

I was upgrading from 14.4.7 to 14.5.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
plekucommented, Mar 31, 2021

We’d like to update to 14.5 because of the security issue report

If you are using OSGi in your apps, I would recommend you to update to version 14.4.10 immediately to get the fix in use for your apps. This way you don’t have to wait for anything or make any changes.

I cannot give any promises to when this would be fixed exactly. As it is not a Severity: Blocker, it would not be urgent and assigned immediately unless prioritized by someone, but since it is regression, it is in the priority-queue after other prioritized issues.

0reactions
vaadin-botcommented, Apr 19, 2021

This ticket/PR has been released with platform 14.6.0.beta2. For prerelease versions, it will be included in its final version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@Route with url parameter template doesn't work ... - GitHub
Description of the bug / feature Navigation to a page having the ... [BUG] RouterLink is using RouteAlias value instead of Route value...
Read more >
Angular routerLink does not navigate to the corresponding ...
So go to the module that declares the component with this template and add: import { RouterModule } from '@angular/router';. then add it...
Read more >
Mastering RouterLink - Briebug Blog
We're going to keep it simple with the following route configuration. ... to the element and give it a valid Angular route as...
Read more >
Annotation Type RouteAlias - Vaadin
Defines the route alias for components that function as navigation targets in routing. ... Gets the route alias path value of the annotated...
Read more >
RouterLink - Angular
Note that a value of undefined here will use the routerLink default. ... If the first segment begins with / , the router...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found