Yes I think you are right seems like a bug. Want to create a patch and a review for it?
On Mon, Jan 7, 2013 at 2:23 PM, Martin Hoeller <mar...@xss.co.at> wrote: > Hi Ryan! > > Am Mon, 7 Jan 2013 13:32:42 -0500 schrieb Ryan Baxter < > rbaxte...@apache.org>: > > > Hope your vacation went well. I would debug through the navigateTo > > call to see what is happening. Looks like it should be called from > > there. > > Actually I did this (a few weeks ago) but stopped in the > getGadgetToken() method. (debuging someone else's JavaScript Code is > really not my passion ;) > > I had a quick look again and it seems, this method is broken. It's > defined in service.js and has the following code in it: > > // Otherwise, cache response. Augment final response with server > response. > } else { > for (var id in response) { > var mid = response[osapi.container.TokenResponse.MODULE_ID], > url = osapi.container.util.buildTokenRequestUrl(id, mid); > > //response[id]['url'] = id; // make sure url is set > self.cachedTokens_[url] = response[id]; > finalResponse[id] = response[id]; > } > } > > The line where "mid" is initialized seems broken. "response" is an > object with the URL as field (something like an associative array), so > response[osapi.container.TokenResponse.MODULE_ID] is undefined. > > Changing > var mid = response[osapi.container.TokenResponse.MODULE_ID], > to > var mid = response[id][osapi.container.TokenResponse.MODULE_ID], > could help, but someone with more experience should have a closer look > to verify it. > > What do you think? > > - martin >