Project

General

Profile

Actions

Bug #6657

closed

App navigates to /#page/X instead of /#data/page/X

Added by Lauren Walker almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
02/02/2015
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

Description

And then the app doesn't display anything except the header and footer because there is no #page set in the router. I need to figure out why the app navigates to that sometimes and if adding #page as a router option that goes to the DataCatalog/Search view, then so be it...

Actions #1

Updated by Lauren Walker almost 10 years ago

  • Status changed from New to Resolved

I was able to recreate this error in themes in which the router renders a view when there is no hash string in the URL. When the app directly renders these views, it does not navigate to the view in the browser, which is two separate things. These themes will now actually navigate to the view itself by changing the window location in the browser. A default view can be set up in the appModel to define which view to navigate to in these cases. I set the default view in all themes to "data", except for the NCEAS theme which has no DataCatalog view, so it's default is the registry.

I also added error handling to the router to avoid things like this from happening in the future. Now, when the router cannot find a match for the given hash string, it will redirect to the aforementioned default view.

Changes have been made in the 1.6 branch and master.

The router uses this Backbone.js plugin to find when a router has not found a match (i.e. 404): https://github.com/STRML/backbone.routeNotFound

Actions

Also available in: Atom PDF