Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359890 - [user] Syntax error in manageOpenids.js
Summary: [user] Syntax error in manageOpenids.js
Status: CLOSED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.3   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 14:20 EDT by Malgorzata Janczarska CLA
Modified: 2011-10-05 08:44 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malgorzata Janczarska CLA 2011-10-04 14:20:36 EDT
When loading profile page syntax error occurs in manageOpenids.js (line 177). OpenId list does not render.
Comment 1 Malgorzata Janczarska CLA 2011-10-04 14:21:41 EDT
Simo, I think it came with your commit: "fixing a bug in how dojo hash was being required in manageOpenids.js".
Comment 2 Simon Kaegi CLA 2011-10-04 16:08:30 EDT
Strange, I'll try it again. The fix I did was to prevent a problem here where we were using dojo incorrectly. e.g. I was having a syntax problem with us using define without requirehs. What is the exact error you get.

I wonder if we're not using the latest build from orbit.
Comment 3 Malgorzata Janczarska CLA 2011-10-05 08:44:34 EDT
(In reply to comment #2)
> I wonder if we're not using the latest build from orbit.

I updated dojo from orbit and I now see what happened. There is an incoming change for dojo.js.uncompressed.js removing definition of "define". The comment says "Reverting to base "define" definition in 1.6.1", but actually if you include "dojo.js.uncompressed.js" "define" is undefined. I can see that in other Orion pages it's provided by require.js.
But this page (manageOpenids) is supposed to be something independent from Orion client, only plugged-in to profile, so I can't use require.js.
When you changed it to use old-fashioned dojo.require("dojo.hash"); is stopped working with errors:

failed loading ../org.dojotoolkit/dojo/./hash.js with error: ReferenceError: define is not defined
console.error("failed loading " + uri + " with error: " + e);
dojo.j...ssed.js (line 694)
Could not load 'dojo.hash'; last tried './hash.js'
[Break On This Error] define("dojo/hash", ["dojo"], function(dojo) { 

Because dojo.hash needs "define" that it's not provided.
When I'm changing from "dojo.js.uncompressed.js" to "dojo.js" it starts working.
I'll leave it this way, but I think "dojo.js.uncompressed.js" should provide "define".