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

Fix invalid route case #33

Closed
coni2k opened this issue May 25, 2015 · 1 comment
Closed

Fix invalid route case #33

coni2k opened this issue May 25, 2015 · 1 comment

Comments

@coni2k
Copy link
Contributor

coni2k commented May 25, 2015

If there is an invalid link, (ex. /content/invalid), it fails to go to /404 page and starts loading home page recursively, which keeps logging this error and hangs the browser;

VM681:8WARNING: Tried to load angular more than once.
VM681:21 Uncaught Error: Highcharts error #16: www.highcharts.com/errors/16

@coni2k coni2k changed the title User / Environment Ignorant Fix invalid route case Mar 11, 2016
@coni2k
Copy link
Contributor Author

coni2k commented Mar 11, 2016

This was happening simply because in route.js - getContentTemplateUrl function, it was trying to get that invalid resource from the server;
return '/_system/views/content/' + key + '.html?v=0.49.0';

Since that html file is not there, IIS returns the home page (web.config - url rewrite rules - "AngularJS Routes") and then creates this infinite loop.

Since this is only happening in content pages, instead of this function, all content routes was defined in route.js (at least as a temp solution) and invalid content case now falls into 'otherwise' block;
.when('/_system/content/allInOne', { templateUrl: '/_system/views/content/allInOne.html..
.when('/_system/content/basics', { templateUrl: '/_system/views/content/basics.html..
.when('/_system/content/home', { templateUrl: '/_system/views/content/home.html..

@coni2k coni2k closed this as completed in a077075 Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant