Don Hinshaw created UNOMI-174:
---------------------------------
Summary: Twitter Sample Bug
Key: UNOMI-174
URL: https://issues.apache.org/jira/browse/UNOMI-174
Project: Apache Unomi
Issue Type: Bug
Reporter: Don Hinshaw
in the javascript contained in index.html in wab/src/webapp in the
self-executing function at line 46 we request the context from the server.
If there is no cookie or session Id, then that call fails.
After clicking the "tweet" button we reach line 75 in the js, and that checks
cxs for the sessionId before creating a new one.
Since we failed to get the context on page load, cxs isn't defined and throws
an exception. Execution stops there.
I changed line 75 to the code below and I was able to load the context and get
a session after clicking tweet.
{code:java}
var sessionId;
try {
sessionId = cxs.sessionId;
} catch (e) {
sessionId = generateUUID();
}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)