Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359180 - VE server cannot load the js files of Dojo Charting theme
Summary: VE server cannot load the js files of Dojo Charting theme
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Huo Zhen Zhong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 02:40 EDT by Huang Ji Yong CLA
Modified: 2017-02-23 14:18 EST (History)
1 user (show)

See Also:


Attachments
Test case (1002 bytes, application/octet-stream)
2011-09-28 02:40 EDT, Huang Ji Yong CLA
no flags Details
fix (5.14 KB, patch)
2011-09-30 03:48 EDT, Huo Zhen Zhong CLA
lasher: iplog+
Details | Diff
fix (1.38 KB, patch)
2011-10-13 02:13 EDT, Huo Zhen Zhong CLA
lasher: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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