[ 
https://issues.apache.org/jira/browse/UNOMI-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424065#comment-16424065
 ] 

Don Hinshaw commented on UNOMI-174:
-----------------------------------

No problem.  I will do that shortly.

> Twitter Sample Bug
> ------------------
>
>                 Key: UNOMI-174
>                 URL: https://issues.apache.org/jira/browse/UNOMI-174
>             Project: Apache Unomi
>          Issue Type: Bug
>            Reporter: Don Hinshaw
>            Priority: Minor
>
> in the javascript contained in wab/src/webapp/index.html 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)

Reply via email to