Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Satheesh Ravi
Problem in fetching the journal article dynamically.
February 1, 2012 5:05 AM
Answer

Satheesh Ravi

Rank: Junior Member

Posts: 35

Join Date: November 24, 2011

Recent Posts

I am trying to fetch an article using $journalContentUtil.getContent(long groupId, String articleId, String viewMode, String languageId, String xmlRequest). It is working fine if the article doesn't have any template and structure within it. If any structure or template is included in the article, it is printing the same line. I'm unable to resolve the problem. I'm using liferay 6.1 with MySQL. Can anyone help please?
Mayur Patel
RE: Problem in fetching the journal article dynamically.
February 1, 2012 5:25 AM
Answer

Mayur Patel

Rank: Expert

Posts: 342

Join Date: November 17, 2010

Recent Posts

Can you try following method which accepts templateId,

1String content = JournalContentUtil.getContent(groupId, articleId, templateId, viewMode, languageId, xmlRequest);


Thanks
Satheesh Ravi
RE: Problem in fetching the journal article dynamically.
February 1, 2012 5:29 AM
Answer

Satheesh Ravi

Rank: Junior Member

Posts: 35

Join Date: November 24, 2011

Recent Posts

I have tried that also but no luck. But thanks for your reply.
Mayur Patel
RE: Problem in fetching the journal article dynamically.
February 1, 2012 5:40 AM
Answer

Mayur Patel

Rank: Expert

Posts: 342

Join Date: November 17, 2010

Recent Posts

you need to workaround for the same, You are free to use any web content template that is associated with the web content structure used by the article by specifying templateId, It seems you are providing incorrect values from other params, can you print other params and check its value, whether its proper or not, try to check in jsp so that you can get clear idea what is missing.

Thanks
Balaji V
RE: Problem in fetching the journal article dynamically.
February 1, 2012 6:19 AM
Answer

Balaji V

Rank: New Member

Posts: 1

Join Date: January 29, 2012

Recent Posts

Hi,
Even i tried with hard coding the values like $journalContentUtil.getContent(10157, '14099', 'view', 'en_US', xmlRequest).

Still it is not working with Structure and templates.I have tried another signature which contains templateId in it. Still not working

Regards,
Satheesh
Fernando Garcia
RE: Problem in fetching the journal article dynamically.
November 20, 2012 9:00 AM
Answer

Fernando Garcia

Rank: New Member

Posts: 5

Join Date: April 12, 2011

Recent Posts

Anyone solved this issue?? I'm having the same problem.

Any help would be nice.
Rodrigo Quesada
RE: Problem in fetching the journal article dynamically.
February 10, 2013 8:21 PM
Answer

Rodrigo Quesada

Rank: New Member

Posts: 1

Join Date: April 26, 2011

Recent Posts

This seems to be the problem in my case (using 6.1.20 EE GA2): http://issues.liferay.com/browse/LPS-25275