Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 419714

Summary: TypeError loading folder view on directory that ends in ".js"
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 3.0   
Target Milestone: 5.0 RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-10-17 09:46:06 EDT
1. Create a top-level folder named "impress.js"
2. Click the folder href -- this loads the folder view on it.
3. A TypeError appears in the log: 

> "TypeError: Cannot call method 'getModel' of undefined"
> TextStyler (textStyler.js:417)
> createDefaultStyler (highlight.js:52)
> createStyler (highlight.js:64)
> SyntaxHighlighter.setup (highlight.js:140)
> (anonymous function) (editorView.js:306)
> (anonymous function) (EventTarget.js:43)
> EventTarget.dispatchEvent (EventTarget.js:40)
> objects.mixin._setInputContents (inputManager.js:476)
> (anonymous function) (inputManager.js:191)
> ...

This is due to a flaw in our contentType-lookup logic, which uses the filename without checking if it's a directory first. Downstream listeners then assume they're dealing with a text editor, which is not the case.

The page seems to work as normal despite the error.
Comment 1 Anthony Hunter CLA 2014-03-13 13:30:48 EDT
Looks like this problem was solved sometime during 5.0, I am not seeing this issue.