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

Bug 359180

Summary: VE server cannot load the js files of Dojo Charting theme
Product: z_Archived Reporter: Huang Ji Yong <hjiyong>
Component: EDTAssignee: Huo Zhen Zhong <huozz>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test case
none
fix
lasher: iplog+
fix lasher: iplog+

Description Huang Ji Yong CLA 2011-09-28 02:40:26 EDT
Created attachment 204144 [details]
Test case

1. Open the attached test case in VE preview. Open it in an external browser (say chrome)
2. Open Chrome developer tools, go to Network pane. Make a refresh if necessary.
3. Find orange.js in the network pane (take care of the case, it is case sensitive). Click at it to show the file content.
4. The file content is
document.write("Could not open  /testDojoWidget/client/dojox/charting/themes/PlotKit/orange.js");

Which is wrong.

When deploy the handler, the js file is correctly loaded. 

This bugs affects all Dojo chart based widgets.
Comment 1 Huo Zhen Zhong CLA 2011-09-30 03:48:22 EDT
Created attachment 204348 [details]
fix
Comment 2 Huo Zhen Zhong CLA 2011-09-30 03:48:57 EDT
caused by uppercase package name
Comment 3 Brian Svihovec CLA 2011-10-12 13:35:05 EDT
I have been looking into the reason that this change was required, based on the understanding that it was not required in RBD.  Looking through both Eclipse CVS and Kan-Sav CVS, I discovered that the folowing change went into FileLocator in version 1.7 of FileLocator in the Kan-Sav CVS repository:

int lastSlash = name.lastIndexOf( '/' );
		if (lastSlash != -1) {
			// Lowercase the package.
			name = name.substring( 0, lastSlash ).toLowerCase() + name.substring( lastSlash );
		}

After talking with the developer about this change, we are not sure why it was necessary.  It is true that all generated content is placed in packages with lowercase names, but the same package names referenced in the deployed HTML file should also be lower cased.  Since users can create file structures with their own casing (e.g. WebContent, etc), we should not change the value of the requested resource coming from the browser.  We are guessing that this change was made (2 months ago) when the Deployment code was still new and it was not lower casing package names correctly.

Forest, please back out the change to FileLocator for both the block of code listed above and the code delivered for this defect and see if anything breaks in a small test. If it does not, we should release these updates so that more people can test with them.  If another issue is uncovered by backing out these changes, we should try to figure out why that issue is occurring in EDT and not RBD.
Comment 4 Huo Zhen Zhong CLA 2011-10-13 02:13:25 EDT
Created attachment 205083 [details]
fix
Comment 5 Huo Zhen Zhong CLA 2011-10-13 02:14:53 EDT
Backing out the changes as Brian mentioned. Have a quick test, and it works fine.
Comment 6 Huang Ji Yong CLA 2011-10-20 23:18:34 EDT
Verified in 201110202102