组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Matteo Pini
Journal Article ID & Friendly Url
2010年9月13日 上午9:44
答复

Matteo Pini

等级: New Member

帖子: 11

加入日期: 2008年3月3日

最近的帖子

Hi,
I'm updating my LR 5.2.3 to LR 6.0.5

I have many journal articles where the article ID is a "string ID" like "SP_BPM" or "SP_CRM" etc.
I publish articles in a page using friendly urls as described in this Wiki article
The url is something like this:

.../web/guest/sw/soluzioni/-/journal_content/56_INSTANCE_wNSI/11417/SP_BPM where
56_INSTANCE_wNSI is the portlet instance
11417 is the community ID
SP_BPM is the article ID

In LR 5.2.3 is working but in LR 6.0.5 it does not: it only works when the article ID is numeric (autogenerated or not) such as "13268" or "12345678".
In my logs i dont'have any error message.
I duplicated an article and changed the articled id from "string form" to "numeric form" and it's displayed, but doing this for all articles...
Vladimir Vukadinovic
RE: Journal Article ID & Friendly Url
2011年9月6日 上午3:17
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Hello,

I have similar problem.
I am using Liferay 6.0. In previous version (5.2.3) I had something like this /home/-/journal_content/56/10122/30819. This is the link for maximize portlet view. Every thing was working property but after upgrade on 6.0 ver I have a problem. When I click on this URL portlet display You do not have the roles required to access this portlet.

Any solutions?
Samir Gami
RE: Journal Article ID & Friendly Url
2011年9月6日 上午4:27
答复

Samir Gami

等级: Regular Member

帖子: 159

加入日期: 2011年2月3日

最近的帖子

Matteo & Vladimir,

This is the change in liferay 6.0, If you check friendly url implementation in liferay 6.0, you will get the clue.

As per the journal article route file article id should be the digit only,
please check "journal-content-friendly-url-routes.xml", for more details.

<route>
<pattern>/56/{groupId:\d+}/{articleId:\d+}</pattern>
<implicit-parameter name="instanceId">0000</implicit-parameter>
<implicit-parameter name="p_p_state">maximized</implicit-parameter>
<implicit-parameter name="struts_action">/journal_content/view</implicit-parameter>
</route>

"\d+" is regular expression to specify the format of parameters,

Hope this may help you.
Let me know, if you wants more information on same.

Thanks & Regards,
Samir Gami
Vladimir Vukadinovic
RE: Journal Article ID & Friendly Url
2011年9月6日 上午4:44
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Hello Samir,

You are in right, I have already found this article. But, I really don't know where are the problem. I have template for web contents listing like news or asset display. Each row is the link for web content details like /home/-/journal_content/56/10122/30819. This value is digit. Do you have any example?

Tnx a lot
Samir Gami
RE: Journal Article ID & Friendly Url
2011年9月6日 上午6:05
答复

Samir Gami

等级: Regular Member

帖子: 159

加入日期: 2011年2月3日

最近的帖子

I am not getting you exactly,

/home/-/journal_content/56/10122/30819 -- this url generate based on the route define in configuration file

As per below pattern,
<pattern>/56/{groupId:\d+}/{articleId:\d+}</pattern>

56 - portletID
10122 - groupId
30819 - articleId

to allow string in articleId, then we needs to change route pattern for webContent display portlet.
Vladimir Vukadinovic
RE: Journal Article ID & Friendly Url
2011年9月6日 上午6:35
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Yes of course, this is my origin URL which have a digit for articleId but does not work. It generate exception that not have role to view this portlet. For remember in 5.2.3 everything worked fine.
This link I generate in xls template

<xsl:variable name="link">
<xsl:value-of disable-output-escaping="yes" select="root/dynamic-element[@name='reserved-article-id']/dynamic-content"/>
</xsl:variable>
/home/-/journal_content/56/10122/{$link}
Samir Gami
RE: Journal Article ID & Friendly Url
2011年9月7日 上午12:07
答复

Samir Gami

等级: Regular Member

帖子: 159

加入日期: 2011年2月3日

最近的帖子

Thanks, I got your point,

This is something related to the Authentication Token used in request.

I am searching for root cause, Let you know if I found any solution, Soon....
Vladimir Vukadinovic
RE: Journal Article ID & Friendly Url
2011年9月7日 上午12:39
答复

Vladimir Vukadinovic

等级: New Member

帖子: 24

加入日期: 2008年10月10日

最近的帖子

Samir, tnx a lot.

I solve this problem. Only set
1portlet.add.default.resource.check.enabled=false
and everything works fine.

Regards
Vladimir
Samir Gami
RE: Journal Article ID & Friendly Url
2011年9月7日 上午12:45
答复

Samir Gami

等级: Regular Member

帖子: 159

加入日期: 2011年2月3日

最近的帖子

Good to see, there is properties to get control on this, Thanks for posting emoticon