You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2019/05/10 17:12:00 UTC
[jira] [Comment Edited] (OFBIZ-11018) Redirection of pathAlias to
aliasTo does not work properly
[ https://issues.apache.org/jira/browse/OFBIZ-11018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837423#comment-16837423 ]
Jacques Le Roux edited comment on OFBIZ-11018 at 5/10/19 5:11 PM:
------------------------------------------------------------------
Hi Pawan, I quickly tested by adding aliasTo="demoHome" into (OOTB)
{code:xml}
<WebSitePathAlias webSiteId="CmsSite" pathAlias="demoHome" contentId="CMSS_DEMO_HOME" fromDate="2016-06-09 13:37:30.43"/>
{code}
It does not work. I still can get to https://localhost:8443/cmssite/cms/demoHome and the URL stays the same but get a 404 at https://localhost:8443/cmssite/cms/newDemoHome
Else if, as you seem to suggest, only adding the entity record
{code:xml}
<WebSitePathAlias pathAlias="demoHome" webSiteId="CmsSite" fromDate="2019-05-01 00:00:00.0" aliasTo="newDemoHome" />
{code}
We get this error:
{noformat}
2019-05-10 17:52:44,944 |jsse-nio-8443-exec-4 |RequestHandler |I| This is the first request in this visit. Hidden sessionId by default.
2019-05-10 17:52:44,972 |jsse-nio-8443-exec-4 |JavaEventHandler |E| Problems Processing Event
java.lang.IllegalArgumentException: Passed List had more than one value.
at org.apache.ofbiz.entity.util.EntityUtil.getOnly(EntityUtil.java:116) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityQuery.queryOne(EntityQuery.java:423) ~[ofbiz.jar:?]
at org.apache.ofbiz.content.cms.CmsEvents.cms(CmsEvents.java:171) ~[ofbiz.jar:?]
{noformat}
Which should maybe be a new Jira BTW because nothing prevents to get in this situation.
Did I miss something? Could you please give more details? Thanks
was (Author: jacques.le.roux):
Hi Pawan, I quickly tested by adding aliasTo="demoHome" into (OOTB)
{code:xml}
<WebSitePathAlias webSiteId="CmsSite" pathAlias="demoHome" contentId="CMSS_DEMO_HOME" fromDate="2016-06-09 13:37:30.43"/>
It does not work. I still can get to https://localhost:8443/cmssite/cms/demoHome and the URL stays the same but get a 404 at https://localhost:8443/cmssite/cms/newDemoHome
Else if, as you seem to suggest, only adding the entity record
{code:xml}
<WebSitePathAlias pathAlias="demoHome" webSiteId="CmsSite" fromDate="2019-05-01 00:00:00.0" aliasTo="newDemoHome" />
{code}
We get this error:
{noformat}
2019-05-10 17:52:44,944 |jsse-nio-8443-exec-4 |RequestHandler |I| This is the first request in this visit. Hidden sessionId by default.
2019-05-10 17:52:44,972 |jsse-nio-8443-exec-4 |JavaEventHandler |E| Problems Processing Event
java.lang.IllegalArgumentException: Passed List had more than one value.
at org.apache.ofbiz.entity.util.EntityUtil.getOnly(EntityUtil.java:116) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityQuery.queryOne(EntityQuery.java:423) ~[ofbiz.jar:?]
at org.apache.ofbiz.content.cms.CmsEvents.cms(CmsEvents.java:171) ~[ofbiz.jar:?]
{noformat}
Which should maybe be a new Jira BTW because nothing prevents to get in this situation.
Did I miss something? Could you please give more details? Thanks
> Redirection of pathAlias to aliasTo does not work properly
> ----------------------------------------------------------
>
> Key: OFBIZ-11018
> URL: https://issues.apache.org/jira/browse/OFBIZ-11018
> Project: OFBiz
> Issue Type: Bug
> Components: cmssite, content
> Affects Versions: Trunk, Release Branch 17.12, Release Branch 18.12
> Reporter: Pawan Verma
> Assignee: Pawan Verma
> Priority: Major
> Attachments: OFBIZ-11018.patch
>
>
> Link of discussion: [https://markmail.org/message/s37whdteejqdzkha]
> In CMS, we can redirect the user to different path alias using 'aliasTo' field of *WebSitePathAlias* entity.
> Example -
> <WebSitePathAlias pathAlias="demoHome" webSiteId="CmsSite" fromDate="2019-05-01 00:00:00.0" aliasTo="newDemoHome" />
> Based on the above data, if the user hit the
> [https://localhost:8443/cmssite/cms/demoHome], the CMS will internally render the content for 'newDemoHome' pathAlias.
> As per my observation, the content for "newDemoHome" is renderd properly (as expected) but the URL of the page (in browser) doesn't change.
> We should also update the URL also, i.e. change browser URL from
> [https://localhost:8443/cmssite/cms/demoHome] to [https://localhost:8443/cmssite/cms/newDemoHome]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)