[
https://issues.apache.org/jira/browse/RAVE-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14297052#comment-14297052
]
Gonzalo Aguilar commented on RAVE-1293:
---------------------------------------
Hi Matt,
Thank you for your effor reviewing patch.
Line 59 -> Yep. If the script cannot be loaded it should not go to the page.
Maybe we can set a warn in the log but it must not go to the page since it will
fail latter breaking the javascript api.
Line 76 -> I created a ScriptHolder that knows where the url points in case it
must use this URL, and also the script. This way we can tell if the script will
run or not. In the case the URL is not accessible from server we will not
render this page. Both ways or doing are neccessary for backwards
compatibility. I don't wanted to break anything done before. But it would be
nice to add this kind of controls all over the code. Also it will be neccessary
to add script caching.
Line 96, I agree. Will do it.
Line 99, Right. Removing.
Line 109, I missed this one. Sorry.
Line 49, You mean use SCRIPT_URL_TEMPLATE result in SCRIPT_TEMPLATE.
rave_openajax_hub.js
The problem with adding the former construct is that if one of the modules
is not available the whole thing will halt.
I mean, even the other projects will not work. You can try it.
And I tried to load only the modules that are static in rave and apart osapi
that comes from shinding. That doesn't work, the intended way to load dynamic
modules in requirejs is like I set. Seems very complicated but it's the way.
Look here.
// Initialize modules see
http://requirejs.org/docs/errors.html#defineerror
The idea should be leave the module working but disable all stuff that
depends on shindg, but I was unable to do that so what I did is replace this
provider with a generic one when shindig is not available. We should refactor
this provider to handle nicely the possibility that shindig is not available.
Line 30. I will take a look to this approach. I don't know if I got it. But
since is async I don't know if I can do it that way. Maybe we can comment in
the mail list.
rave_opensocial.js
Sorry. It was eclipse. Maybe I did a reident without taking much care.
For the rest I will do it.
Just one note. Maybe we can make a little more logic into the ScriptHolder and
DefaultScriptManager for caching and ensuring that scripts will render. Maybe
also some isolation.
> 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
>
> Attachments: level2-shindig-prefix.patch
>
>
> 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)