Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Error loop in 1.2 version of API docs if the URL is an invalid path #8518

Closed
nlwillia opened this issue Aug 7, 2014 · 1 comment
Closed

Comments

@nlwillia
Copy link

nlwillia commented Aug 7, 2014

I started at https://docs.angularjs.org/api/ng/directive/ngModelOptions then I clicked the select box at the top and picked 1.2.21 to see if that feature was in 1.2.x. It wasn't, and when the path didn't exist, the 1.2.x version of the API docs melted down with an infinite error loop.

TypeError: Cannot read property 'path' of undefined
    at k.$scope.navClass (https://code.angularjs.org/1.2.21/docs/js/docs.js:93:47)
    at https://code.angularjs.org/1.2.21/angular.min.js:176:88
    at k.$eval (https://code.angularjs.org/1.2.21/angular.min.js:111:373)
    at https://code.angularjs.org/1.2.21/angular.min.js:140:192
    at https://code.angularjs.org/1.2.21/angular.min.js:66:64
    at k.$eval (https://code.angularjs.org/1.2.21/angular.min.js:111:373)
    at k.$digest (https://code.angularjs.org/1.2.21/angular.min.js:108:462)
    at k.$apply (https://code.angularjs.org/1.2.21/angular.min.js:112:173)
    at h (https://code.angularjs.org/1.2.21/angular.min.js:72:300)
    at w (https://code.angularjs.org/1.2.21/angular.min.js:77:288) angular.js:10023
TypeError: Cannot read property 'path' of undefined
    at k.$scope.navClass (https://code.angularjs.org/1.2.21/docs/js/docs.js:93:47)
    at Object.get (https://code.angularjs.org/1.2.21/angular.min.js:176:88)
    at k.$digest (https://code.angularjs.org/1.2.21/angular.min.js:109:78)
    at k.$apply (https://code.angularjs.org/1.2.21/angular.min.js:112:173)
    at h (https://code.angularjs.org/1.2.21/angular.min.js:72:300)
    at w (https://code.angularjs.org/1.2.21/angular.min.js:77:288)
    at XMLHttpRequest.A.onreadystatechange (https://code.angularjs.org/1.2.21/angular.min.js:78:375) 

This seems to be an issue throughout the 1.2 branch. 1.3 returns a not found page when the relative path doesn't exist. Since the docs run the version of angular they describe, there may not be a good solution for the older versions. But if at least the latest stable 1.2.x version worked, then this would be less likely to bite people. It's not a big deal in browsers with per-tab process isolation, but Firefox, for example, has to be killed completely which can result in lost work.

@caitp
Copy link
Contributor

caitp commented Aug 7, 2014

/cc @petebacondarwin

@caitp caitp modified the milestones: 1.3.0-beta.18, 1.3.0 Aug 7, 2014
@IgorMinar IgorMinar modified the milestones: 1.3.0, 1.3.0-rc.0 Aug 25, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants