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

Gonzalo Aguilar commented on RAVE-1293:
---------------------------------------

Hi, 

Here there are two commits. The part that's not working well is the js one. 
Because osapi is required in some parts to just begin processing. And sometimes 
(when shindig is not available) we will not have osapi. So I require osapi in a 
second step. And it works when it's not ready. 

But unfortunately the provider for opensocial is not ready before the system 
requires it to draw the widgets when it's pressent and it cannot detect it. So 
widgets are not loaded even if it's possible to render them. The solution is to 
make rave_widget.js wait on line 48 until the driver is fully loaded. But I 
don't really know how to do it since not an expert with requirejs. 

Maybe you can help. 

Anyway I post here the patch so you can review. 

There are two interesting things.
  The first it check for shindig to be present before trying to get metadata of 
a widget. It will fail controlled if not. (/ShindigGadgetMetadataRep
ository.java)
  The second and more important, it will not try to render any script against 
shindig if it's not present. So osapi will also not be loaded from script.  
(DefaultScriptManager.java)

Maybe you can patch partially the current master. And help with the javascript 
problem.



> Rave crashes when shindig is not available
> ------------------------------------------
>
>                 Key: RAVE-1293
>                 URL: https://issues.apache.org/jira/browse/RAVE-1293
>             Project: Rave
>          Issue Type: Bug
>          Components: rave-opensocial-provider
>    Affects Versions: 0.23
>            Reporter: Gonzalo Aguilar
>             Fix For: 0.24
>
>
> Rave fails when shindig is not available when trying to get metadata info for 
> a widget. This patch returns an empty metadata when it's not available so 
> Rave can render an empty widget. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to