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

Created on 31 Mar 2021  路  4Comments  路  Source: vaadin/flow

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

High Released with Platform 19.0.4 Released with Platform 20.0.0.alpha6 Major bug prerelease version for platform 20.0.0 regression routing

Most helpful comment

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.

All 4 comments

Thanks for using Vaadin Platform, we appreciate your help and are going to take care of this as soon as possible.

Hi and thanks for the detailed report. It seems this is a regression in 14.5 and similar (but not the same) to #9969 with something going wrong with @RouteAlias(""). Just want to confirm that there is nothing broken for the end user - just the tests are affected ?

@pleku The page could be loaded normally in this case, so for the end user, it worked. Yes, for our project, only the tests are affected.

I'd like to know how long it will take your team to fix this to decide whether we should upgrade to 14.5.1 now. We'd like to update to 14.5 because of the security issue report https://vaadin.com/security/2021-03-29. It would be better for us to not change our BDD tests because of this regression bug.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pleku picture pleku  路  4Comments

marcushellberg picture marcushellberg  路  4Comments

rucko24 picture rucko24  路  3Comments

SomeoneToIgnore picture SomeoneToIgnore  路  4Comments

Artur- picture Artur-  路  4Comments