留言板

[Closed]Journal display as RSS Feed

na na,修改在15 年前。

[Closed]Journal display as RSS Feed

Junior Member 帖子: 94 加入日期: 08-4-29 最近的帖子
I try to configure the journal articles so it can display out as RSS feed. So I try to follow the instruction here http://www.liferay.com/web/guest/community/forums/-/message_boards/message/97032
but I suspect some of the info provided isn't work on the Liferay Enterprise Portal 5.0.1.
I try the query of http://localhost/c/journal/get_article?groupId=15023&articleId=15589 and it display the xml without problem but when I try to query a list of article using this query http://localhost/c/journal/get_article?groupId=15023 and this one fail.
So is there anyway to achieve this and where can I write the XSL so I can have a control over how to display the articles also where to put the xsl files?
thumbnail
Ray Augé,修改在15 年前。

Re: [Liferay Forums][2. Using Liferay] Journal display as RSS Feed

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
It is no longer required (in 5.0.0+) to manually create RSS feeds for
Journal Articles by hand. We have an automated UI for creating as many
RSS feeds as you require from Journal content.

See the Feeds tab. There are many options which allow for great
flexibility for customized feeds.

In fact it even supports podcasting OOTB.
na na,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 94 加入日期: 08-4-29 最近的帖子
Then how can I set the way the Feed Item Content is rendered, since now I can only see 2 option, one is article description and another is Use Default Template. Where can I create my own template and where is the default template located?
thumbnail
Ray Augé,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
I presume that you will be collecting content based on a give Structure
correct? You must, because the API calls make the same assumption.

So, select the Structure for which you wish to collect content. Then,
you will see new options for "Feed Item Content" based on the Structure
selected.

You will be able to select any individual field of the structure as the
content, or even a specific Template that is associated to that
Structure.

HTH!
Leo Wadsworth,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 77 加入日期: 07-11-18 最近的帖子
There are no sample structures or templates included in the 5.1.1 distribution. Is there any place to get some? What's the simplest possible structure and the simplest possible template?

Thanks!
thumbnail
Ray Augé,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
The simples possible Structure is:

<root>
  <dynamic-element name="field-1" type="text_box" />
</root>


and the simples possible Journal Template (VM) is:

$field-1.data
Leo Wadsworth,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 77 加入日期: 07-11-18 最近的帖子
THANKS!
thumbnail
Ray Augé,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
Here is a slightly more rich example.

Let's take for example a simple News feed. These you want to have searchable on the site, you want them listable in the Asset Publisher by tags etc. You ALSO want to be able to generate an RSS feed, right? Sure!

Create a new Structure, fill in the required fields, click the "Launch Editor" button and paste the following code (overwrite the current content), "Update" and "Save" the Structure.

<root>
  <dynamic-element name="title" type="text" />
  <dynamic-element name="summary" type="text_box" />
  <dynamic-element name="body" type="text_area" />
  <dynamic-element name="image" type="image" />
  <dynamic-element name="image-caption" type="text" />
</root>


Create a new Journal Template of type (VM) and associate it with the above Structure, click the "Launch Editor" button and paste the following code into the editor (overwrite the existing content), "Update" and "Save":

<h1>$title.data</h1>
<span style="font-size: smaller; color: #ccc">
  By: $reserved-article-author-name.data, Updated: $reserved-article-modified-date.data
</span>

<p>$summary.data</p>

<p>
  <img src="$image.data" alt="$image-caption.data" style="float: left; margin: 4px;">
  $body.data
</p>


Next, create a bunch or articles using this Structure, as many as you like. You can place these articles however you like on the site using the various portlets like Journal Content portlet, Asset Publisher portlet, etc.

Finally, create a Journal Feed and select the above Structure. The "Feed Item Content" will list all the individual fields and also indicate the type. Also, you will see listed all the Templates available. This allows you to have different templates associated to each article when they are displayed on the site, BUT you can override that in the RSS feed, so that they all use a common template strictly in the RSS. For example, if you wanted the RSS items to show only the summary and the image, you could have another template like so:

<p>
  <img src="$image.data" alt="$image-caption.data" style="float: right; margin: 4px;">
  $summary.data
</p>


and then specify this template as the value of "Feed Item Content".

Does this help?

Please try it out and if you get stuck post back here and we'll work through it again.
na na,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 94 加入日期: 08-4-29 最近的帖子
I try your method but at the feed item content, it still only show default template only.

Also even after I created the feed, when I click on it, it just show Journal Portlet then blank content.
na na,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 94 加入日期: 08-4-29 最近的帖子
I think I finally partially figure out how this rss feed works, seems like pages need to be created before other configuration.
I still got 4 questions:
1. How to display out the feed can be control by template?
2. Can we add css display into the template?
3. Can we create feed that meets certain criteria in the structure? For example I only want to list out all the article title that have a "test" phrase in the title or title have test and body have "something".
4. After I create the feed then I try to put the feed URL to the RSS portlet and it gives me the error
http://localhost:8080/group/12300/3/journal/rss/13288/TESTFEED/ cannot be found.
thumbnail
Ray Augé,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
> 4. After I create the feed then I try to put the feed URL to the RSS
> portlet and it gives me the error
> http://localhost:8080/group/12300/3/journal/rss/13288/TESTFEED/ cannot
> be found.


Yeah, this issue is a know bug, the URL is not generated correctly. Try
this url instead:

[tt]http://localhost:8080/group/12300/3/-/journal/rss/13288/TESTFEED[/tt]

The simple solution is to simply insert [tt]/-/[/tt] between the
Layout Friendly URL part and the Portlet Friendly URL part.
na na,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 94 加入日期: 08-4-29 最近的帖子
Thanks Ray, but after adding /-/ it gives me another error
03:32:58,656 ERROR [WebCachePoolImpl] com.liferay.portal.kernel.webcache.WebCach
eException: http://localhost:8080/group/12300/3/-/journal/rss/12300/TESTFEED ja
va.io.FileNotFoundException: http://localhost:8080/group/12300/3/-/journal/rss/
12300/TESTFEED
com.liferay.portal.kernel.webcache.WebCacheException: http://localhost:8080/gro
up/12300/3/-/journal/rss/12300/TESTFEED java.io.FileNotFoundException: http://lo
calhost:8080/group/12300/3/-/journal/rss/12300/TESTFEED
thumbnail
Ray Augé,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
Ah, this looks like a permission error.

If the target layout is a private layout, and the RSS portlet is in
another community, then the permissions would prevent access to the
layout.

I believe this is the case, because I see that you're target layout URL
is [tt]/group/12300/3[/tt]. Try making the target url a public layout.
Like [tt]/web/12300/3[/tt].

HTH!
na na,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 94 加入日期: 08-4-29 最近的帖子
Thanks Ray, I finally figure the whole thing out.
thumbnail
Josh Asbury,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Expert 帖子: 498 加入日期: 06-9-8 最近的帖子
Hi Ray -

I am trying to get this same concept to work with your Expando example from your blog, but I'm coming up empty. I have created an RSS-specific template with the following information:
<p>
First Name: $firstName.data
Balance: $balance.data
</p>

In my Feed, I have made the Target Page Friendly URL be the page that I am hosting the Expando example on and even made the Target Portlet ID match the Expando example. When I add the RSS portlet to the page, though, all that I am seeing is the page title.

Any ideas what I'm missing?

Thanks!
Josh
thumbnail
Ray Augé,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 1197 加入日期: 05-2-8 最近的帖子
Ok, I'm a little lost. Can you give me more detail of the infrastructure here? two VM templates (even if they are displayed on the same page) do not share context... i.e. they won't know each other's values. They are distinctly independent. You'd have to either use parameters to pass values between them, or something like ajax or somesuch...

Again, maybe I'm not understanding your setup.
thumbnail
Josh Asbury,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Expert 帖子: 498 加入日期: 06-9-8 最近的帖子
Hi Ray -

So, I have created a Template which allows for the creation of Expando data, and what I want to do is to be able to offer pieces of that user-submitted data up as an RSS feed....and I have created a different template that removes the data entry pieces and only pulls the Expando data. That's the one that I'm using for the Feed.

My end goal is to have users submit some address information so that I can capture that, send it to a feed where I can then add some Geo parameters to it and have their location information appear on a Google map. Step 1 for me, though, is to consume the data that the users have submitted and have it appear in an RSS feed. Once I've gotten that, happiness and mirth results!
thumbnail
Josh Asbury,修改在15 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Expert 帖子: 498 加入日期: 06-9-8 最近的帖子
Ahhh....

I just figured out where I went astray. The Feeds are feeds of multiple journal articles....not the content of the articles. I'm shooting for creating a feed from the data that I am having users submit.

So, I'm digging around through the forums, and I see references to the BASIC-RSS-FEED and BASIC-RSS-ITEM structures and templates that used to come with the default data -- but I don't see that they are included in the sample database. Does anyone have samples of these templates and structures that might help me out? Or better yet, do you have any thoughts on how to get data out of the DB into Feed form without doing a ton of work (I know this is probably easy...that's why it's killing me).

Since we're on the topic of feeds, how would one bring the calendar data into a feed? That might scratch my itch as well.

Thanks!
Josh
thumbnail
Peter Mesotten,修改在14 年前。

Journal display as RSS FeedI

Junior Member 帖子: 45 加入日期: 09-2-4 最近的帖子
Question 1: Feed Item Content

I'm trying to create a feed based on structured web content.

I've a very simple structure with only one field (title). I created some articles based on this structure and I know want to aggregate them into a feed. To this purpose, I select the Title field as Feed Item Content.

If I save, an error pops up: Please select a valid feed item content.

I dove into the code and noticed the problem was a ClassCastException in JournalFeedLocalServiceImpl.isValidStructureField():
Element el = (Element)xpathSelector.selectSingleNode(doc);


Is this a known bug?


Question 2: RSS Portlet

I created a Liferay feed (RSS 1.0) and tried to show it in a RSS portlet. It worked, but the RSS is not updated when a new article is added or when its content (f.e. title, description, ...) changes.

Is this some known defect?


Thanks in advance!!
thumbnail
Olaf Kock,修改在14 年前。

RE: Journal display as RSS FeedI

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
I remember that 5.1.2 had a bug in RSS feed creation (e.g. the feed was not created, may have been due to a ClassCastException - I don't recall exactly, but I remember to have patched it)

If you're running this version, look for fixes later in the 5.1 branch or in the 5.2.x wrt RSS and you'll easily find the FishEye view for the necessary patch.
thumbnail
Peter Mesotten,修改在14 年前。

RE: Journal display as RSS FeedI

Junior Member 帖子: 45 加入日期: 09-2-4 最近的帖子
Thanks Olaf,

I forgot to say: I tried this in 5.2.2 and 5.2.3 but both with the same result.
I didn't find anything like this in Liferay's issue tracker...
z z z,修改在13 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 25 加入日期: 09-2-12 最近的帖子
i use liferay 6.0.5, tomcat 6.0.27 and mysql db


RSS portlet throws an error when web content feed is being displayed

i have an error with rss portlet

1) Create A Public Page For Feed
2) Create A Feed through web content and point it at that public page
3) Set the guest permissions of the feed to view
4) Add RSS Portlet to another page
5) Put the url from the feed in configuration
6) Whenever you click on the feed link i created, i will get an error, see it

"You do not have the roles required to access this portlet."


this portlet is Web Content Display


any help???
Imad Eddine,修改在13 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

New Member 发布: 1 加入日期: 10-11-3 最近的帖子
i have the same problem two..
Hepl pleaseemoticon
Christophe Noel,修改在10 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Junior Member 帖子: 99 加入日期: 12-9-28 最近的帖子
Hello!

I must work using Liferay 6.0.5 and I'm facing the same issue.

Would you have an idea to workaround this problem ? I really need to use that RSS custom feed.

Many thanks,

Christophe.

z z z:
i use liferay 6.0.5, tomcat 6.0.27 and mysql db


RSS portlet throws an error when web content feed is being displayed

i have an error with rss portlet

1) Create A Public Page For Feed
2) Create A Feed through web content and point it at that public page
3) Set the guest permissions of the feed to view
4) Add RSS Portlet to another page
5) Put the url from the feed in configuration
6) Whenever you click on the feed link i created, i will get an error, see it

"You do not have the roles required to access this portlet."


this portlet is Web Content Display


any help???
chandra nelapatla,修改在13 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

New Member 帖子: 3 加入日期: 10-10-19 最近的帖子
HI

I have tried following the instructions. I am getting issues in selecting the structure for journal feed. As soon as I click on the structure the structure disappears, could please tell me what the issues is?
thumbnail
Akash Jaisawal,修改在10 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Regular Member 帖子: 141 加入日期: 12-3-3 最近的帖子
Ray
Hello Ray,

I am also facing some issue related with RSS.
I have a RSS option inside Portal's Forum.
When i click on it, it always open a xml file in browser like this.
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>test</title>
<link rel="self" href="http://localhost:8080/c/message_boards/find_thread?p_l_id=&threadId=27162"/>
<subtitle>test</subtitle>
<id>
http://localhost:8080/c/message_boards/find_thread?p_l_id=&threadId=27162
</id>
<updated>2014-03-31T09:15:24Z</updated>
<dc:date>2014-03-31T09:15:24Z</dc:date>
<entry>
<title>RE: test</title>
<link rel="alternate" href="http://localhost:8080/c/message_boards/find_message?p_l_id=&messageId=27168"/>
<author>
<name>Akash jaiswal</name>
</author>
<id>
http://localhost:8080/c/message_boards/find_message?p_l_id=&messageId=27168
</id>
<updated>2014-03-31T06:08:23Z</updated>
<published>2014-03-31T06:08:23Z</published>
<summary type="html">Hello Test</summary>
<dc:creator>Akash jaiswal</dc:creator>
<dc:date>2014-03-31T06:08:23Z</dc:date>
</entry>
<entry>
<title>test</title>
<link rel="alternate" href="http://localhost:8080/c/message_boards/find_message?p_l_id=&messageId=27161"/>
<author>
<name>Akash jaiswal</name>
</author>
<id>
http://localhost:8080/c/message_boards/find_message?p_l_id=&messageId=27161
</id>
<updated>2014-03-31T06:07:39Z</updated>
<published>2014-03-31T06:07:39Z</published>
<summary type="html">Test-Forum</summary>
<dc:creator>Akash jaiswal</dc:creator>
<dc:date>2014-03-31T06:07:39Z</dc:date>
</entry>
</feed>


Not sure whats happeining,
Please help me to figure it out emoticon
Thanks
AKash
thumbnail
Olaf Kock,修改在9 年前。

RE: Re: [Liferay Forums][2. Using Liferay] Journal display as RSS FeedI

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Is there any problem with this RSS feed? This is exactly what RSS is supposed to look like. You can "subscribe" to this feed, e.g. with Thunderbird or any other RSS reader. It's meant to be machine-readable and contains metadata about the latest changes in your forum.