Foros de discusión
Opensocial gadgets and Liferay on HTTPS
Peter Clijsters, modificado hace 11 años.
Opensocial gadgets and Liferay on HTTPS
New Member Mensaje: 1 Fecha de incorporación: 23/04/12 Mensajes recientes
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.
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., modificado hace 11 años.
RE: Opensocial gadgets and Liferay on HTTPS
Junior Member Mensajes: 44 Fecha de incorporación: 19/07/12 Mensajes recientes
Thanks a lot. You saved a lot of my time!
Sergii Kryshtop, modificado hace 11 años.
RE: Opensocial gadgets and Liferay on HTTPS
New Member Mensaje: 1 Fecha de incorporación: 22/02/13 Mensajes recientes
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 ?/*
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 ?/*
Dennis Ju, modificado hace 10 años.
RE: Opensocial gadgets and Liferay on HTTPS
Regular Member Mensajes: 228 Fecha de incorporación: 30/09/10 Mensajes recientes
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.
Dennis Ju, modificado hace 10 años.