留言板

Opensocial gadgets and Liferay on HTTPS

Peter Clijsters,修改在11 年前。

Opensocial gadgets and Liferay on HTTPS

New Member 发布: 1 加入日期: 12-4-23 最近的帖子
Hi,

We've ran into an issue with CE 6.1 that some Opensocial gadgets would not render correctly (or at all). We've traced this issue to some Shindig configuration errors (note that Apache Shindig is the rendering engine for the Opensocial gadgets in Liferay).

The URL's Shindig uses when rendering gadgets are defined in liferay/tomcat-7.0.23/webapps/opensocial-portlet/WEB-INF/classes/containers/default/container.js
In this file, there are some hard references to "http" URL's. I've changed these to "//" which will be replaced with the protocol (http / https) used. I haven't had time to test this fully, but if this does not work for you, substitute it with "https" instead.

The entries that i've modified in the above file:
"gadgets.jsUriTemplate" : "//%host%/opensocial-portlet/gadgets/js/%js%",
"gadgets.osDataUri" : "//%host%/opensocial-portlet/rpc",
"defaultShindigTestHost": "//%host%",

In the same file, in the gadgets.features - opensocial JSON struct:
"path" : "//%host%/opensocial-portlet/rpc",
"invalidatePath" : "//%host%/opensocial-portlet/rpc",


After these modifications, restart Liferay.

P.
Matthieu R.,修改在11 年前。

RE: Opensocial gadgets and Liferay on HTTPS

Junior Member 帖子: 44 加入日期: 12-7-19 最近的帖子
Thanks a lot. You saved a lot of my time!
Sergii Kryshtop,修改在11 年前。

RE: Opensocial gadgets and Liferay on HTTPS

New Member 发布: 1 加入日期: 13-2-22 最近的帖子
Hey,
I've followed your way and after I've changed the container.js I've received an error that says:
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 1 of ?/*
thumbnail
Dennis Ju,修改在10 年前。

RE: Opensocial gadgets and Liferay on HTTPS

Regular Member 帖子: 228 加入日期: 10-9-30 最近的帖子
Are you using JBoss? You may need to strip out all comments from container.js as the JBoss parser doesn't play well with comments in .js files.
thumbnail
Dennis Ju,修改在10 年前。

RE: Opensocial gadgets and Liferay on HTTPS

Regular Member 帖子: 228 加入日期: 10-9-30 最近的帖子
This issue will be fixed in LPS-34686