[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=16843794#comment-16843794 ] Pawan Verma edited comment on OFBIZ-11018 at 5/20/19 9:09 AM: -- Hello [~jacques.le.roux], Original pathAlias should not have any content associated with it(existing condition) and associate content with the aliasTo. And aliasTo should be associated with content which should be rendered on the screen. I have attached some example data for the same. {code:java} {code} Hitting URL [https://localhost:8443/cmssite/cms/demoHome2] should redirect to [https://localhost:8443/cmssite/cms/demoPage2] Please let me know in case of any concern. Thanks! was (Author: pawan.verma): Hello [~jacques.le.roux], Original pathAlias should not have any content associated with it(existing condition) and associate content with the aliasTo. And aliasTo should be associated with content which should be rendered on the screen. I have attached some example data for the same. {code:java} {code} {code:java} {code} Please let me know in case of any concern. 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: Image 001.png, OFBIZ-11018.patch, 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 - > 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)
[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=16837778#comment-16837778 ] Pawan Verma edited comment on OFBIZ-11018 at 5/11/19 7:40 AM: -- Hello [~jacques.le.roux], Thanks for reviewing this. Edit WebSite Path Alias is not working, I have logged OFBIZ-11022 for this. {code:java} java.lang.IllegalArgumentException: Passed List had more than one value. {code} For this error: As I see from the data provided by you two *WebSitePathAlias* records has been created in the system as both have different fromDate with the same pathAlias. Code is using queryOne to fetch the record, I have updated it to use queryFirst instead(*Updated patch for this*). For checking this functionality: I would suggest creating two new pathAlias from the content screen or manual XML data. Original pathAlias should not have any content associated with it(existing condition) and associate content with the aliasTo. Please let me know in case of any concern. Thanks! was (Author: pawan.verma): Hello [~jacques.le.roux], Thanks for reviewing this. Edit WebSite Path Alias is not working, I have logged [OFBIZ-11022|https://issues.apache.org/jira/browse/OFBIZ-11022] for this. {code:java} java.lang.IllegalArgumentException: Passed List had more than one value. {code} For this error: As I see from the data provided by you two *WebSitePathAlias* records has been created in the system as both have different fromDate with the same pathAlias. Code is using queryOne to fetch the record, I have updated it to use queryFirst instead(*Updated patch for this*). For checking this functionality: I would suggest creating two new pathAlias from the content screen or manual XML data. Original pathAlias should not have any content associated with it(existing condition) and associate content with the aliasTo. Please let me know in case of any concern. 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, 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 - > 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)
[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=16837423#comment-16837423 ] Jacques Le Roux edited comment on OFBIZ-11018 at 5/10/19 5:12 PM: -- Hi Pawan, I quickly tested by adding aliasTo="demoHome" into (OOTB) {code:xml} {code} It does not work. I still can get to [https://localhost:8443/cmssite/cms/demoHome] and the URL stays the same. I get a 404 at [https://localhost:8443/cmssite/cms/newDemoHome] Else if, as you seem to suggest, only adding the entity record {code:xml} {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} {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} {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 - > 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)
[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=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} {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} {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} 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} {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 - > 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)