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.

First route in base Component is overwritten when extending its routes

See original GitHub issue

OpenUI5 version: 1.36.9-

Browser/version (+device/version):

  • Chrome 50.0.2661.102 m for Windows
  • Microsoft Edge 25.10586.0.0
  • Probably affecting others as well

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): https://github.com/fabiopagoti/ui5-extend-navigation/commit/947ed7b9c5bab483218bba357d04cd1891d7450d

User/password (if required and possible - do not post any confidential information here):

As this issue is related with Component extensions, there are two components

base.app -> inside folder “Base” ext.app -> inside folder “ExtensionDifferentDefaultRoute”

Inside the base Component, there are three views and the navigation between them work as follows

A* <—> B <—> C

  • = default route (pattern: “” in the route object)

Inside the extension Component, the objective is to have the same views and the same navigation, just changing the default route to make B as the default view

A <—> B* <—> C

Steps to reproduce the problem: 0. Open app inside folder Base and navigate between all views

  1. Open app inside folder ExtensionDifferentDefaultRoute -
  2. Click in the “Go to C” button (it navigates normally to page C)
  3. Click in the “Go to B” button (it navigates normally to page B)
  4. Click in the “Go to A” button (it displays an error in the console - Can not navigate to route with name r1 because the route does not exist)

What is the expected result? It should navigate to page A

What happens instead? Navigation is not triggered

Any other information? (attach screenshot if possible)

Inside method onPressButtonA of controller Second, inspect available routes using the following commands

var router = this.getOwnerComponent().getRouter() router._oRoutes

You will see that route r1 is not available.

Now, open Component.js from the Base folder and remove the comment in line

routes: [
// {}, // uncomment this to make r1 available in the extension component
{
    pattern: "",
    name: "r1",
    target: "t1"
},

There will be a empty and first route in the base component.

After that, repeat the steps and you will see that the error is not displayed in the console anymore, but the navigation to page A is still not triggered.

This proves that the “First route in base Component is overwritten when extending its routes”.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Michadeliccommented, May 20, 2016

Hello Fabio,

thanks for the very detailed description of the problem and also providing a git repository to reproduce the issue. I will have to ask our component expert to take a look as this will need some deeper analysis from our side.

Stay tuned, we will get back to you soon here.

Internally tracked as: #1670331623

Kind Regards, Michael

0reactions
petermuessigcommented, Jun 1, 2016

Hi Fabio,

ok - I will close this ticket. But I will consider to enhance the documentation as you suggested.

Best regards, Peter

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get React-Router to only overwrite <main> when ...
Here is what I've tried so far: import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter as Router, Route, Link } ...
Read more >
Re-routing & Rearranging Existing Routes on a PCB in Altium ...
This page looks at modifying existing routing, either by rerouting or re-arranging. The former allows you to interactively place a fresh ...
Read more >
Route configuration | OpenShift Container Platform 4.10
Path-based routes specify a path component that can be compared against a URL, which requires that the traffic for the route be HTTP...
Read more >
Dynamic Routing | Vue Router
The example above assumes two things: first, the newly added route record will match the to location, effectively resulting in a different location...
Read more >
Spring Cloud Gateway
Configuring Route Predicate Factories and Gateway Filter Factories. There are two ways to configure predicates and filters: shortcuts and fully expanded ...
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