Fórum

Add this application to any website...

Paul Allen, modificado 15 Anos atrás.

Add this application to any website...

New Member Postagens: 5 Data de Entrada: 18/09/08 Postagens Recentes
I'm trying out Journal Content portlet content sharing by copying the HTML provided by the "Add this application to any website" link. When I use that HTML on a web page, I get a frame/outline of some sort, but no actual content. I'm trying this all on localhost -- both the liferay server and my web server are on localhost, as is my browser client. Are there any configuration switches that need to be flipped in order to enable that sharing?

I'm using the Liferay 5.1.1 bundle for TomCat 6.0.
thumbnail
Ray Augé, modificado 15 Anos atrás.

Re: [Liferay Forums][x. Miscellaneous] Add this application to any website.

Liferay Legend Postagens: 1197 Data de Entrada: 08/02/05 Postagens Recentes
Extract the URL in the paste code and try it in a new browser window.
Does it work?

Can you paste it here?

There were some bugs that were fixed in the 5.1.x branch related to url
handling which affected "widget" mode (which is the basis for
"Sharing").
Paul Allen, modificado 15 Anos atrás.

RE: Re: [Liferay Forums][x. Miscellaneous] Add this application to any webs

New Member Postagens: 5 Data de Entrada: 18/09/08 Postagens Recentes
Unfortunately, I just have a private test instance running. The URL is http://localhost:8080/widget/web/guest/home/-/journal_content

That URL referenced in the "Add this application to any website" doesn't respond with anything meaningful, so I guess that I'm running into the bug that you mentioned. I wasn't sure if that URL was supposed to return anything, when used outside the JavaScript wrapper that surrounds it. If it is, then that's an easy way for me to test when I get a version of LifeRay where that bug is fixed.

Thanks,
-Paul
Paul Allen, modificado 15 Anos atrás.

RE: Re: [Liferay Forums][x. Miscellaneous] Add this application to any webs

New Member Postagens: 5 Data de Entrada: 18/09/08 Postagens Recentes
Hi all, I just downloaded and tried this same functionality with the Liferay 5.1.2 (Tomcat 6.0) package and got the same result: no content being imported from the liferay site into the "my" site.

Any thoughts?
thumbnail
John Martin, modificado 15 Anos atrás.

RE: Re: [Liferay Forums][x. Miscellaneous] Add this application to any webs

Junior Member Postagens: 29 Data de Entrada: 23/06/08 Postagens Recentes
I ran into the same issue and did some experimentation. At this point it appears to be a bug with the Sharing context window not creating the correct URL for Journal Content portlets. I've opened a JIRA ticket on this issue.

http://support.liferay.com/browse/LPS-58

John
thumbnail
John Martin, modificado 15 Anos atrás.

RE: Re: [Liferay Forums][x. Miscellaneous] Add this application to any web

Junior Member Postagens: 29 Data de Entrada: 23/06/08 Postagens Recentes
I found that there is a work around to get this working. I replaced the 'journal_content' in the URL with the Portlet Id that is displayed in the portlet Configuration page and the content gets displayed correctly.

You need to change the following in the javascript accordingly:

Change
Liferay.Widget({ url: 'http://WWW.YOUR_DOMAIN.COM/widget/web/guest/community/-/journal_content'});

to
Liferay.Widget({ url: 'http://WWW.YOUR_DOMAIN.COM/widget/web/guest/community/-/PORLET_ID'});
Paul Allen, modificado 15 Anos atrás.

RE: Re: [Liferay Forums][x. Miscellaneous] Add this application to any web

New Member Postagens: 5 Data de Entrada: 18/09/08 Postagens Recentes
Thanks. That solution works. I'm getting Liferay content on my other site! Yay!
thumbnail
Raj K, modificado 13 Anos atrás.

RE: Re: [Liferay Forums][x. Miscellaneous] Add this application to any web

Regular Member Postagens: 214 Data de Entrada: 19/06/09 Postagens Recentes
Basically if the portlet is instanceable then use the instance id otherwise use the friendly url.