You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Serge Huber (JIRA)" <ji...@apache.org> on 2018/04/03 08:21:00 UTC
[jira] [Commented] (UNOMI-174) Twitter Sample Bug
[ https://issues.apache.org/jira/browse/UNOMI-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423642#comment-16423642 ]
Serge Huber commented on UNOMI-174:
-----------------------------------
Hello Don,
Thanks a lot for identifying this problem. Could you create a pull request for this on the github project [https://github.com/apache/incubator-unomi] ? This way I could review and integrate this fix quickly ?
Regards,
Serge...
> 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)