[PAGES-1017] Remove prefix website when using @name in routeTemplate of site norsu definition Created: 02/Feb/23  Updated: 14/Mar/23  Resolved: 08/Feb/23

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0

Type: Bug Priority: Major
Reporter: Oanh Thai Hoang Assignee: Canh Nguyen
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 4d 2.75h Time Spent: 3d 7.75h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File use-path.png     PNG File using-name.png    
Issue Links:
documentation
to be documented by PAGES-1094 DOC: Remove prefix website when using... Closed
relation
is related to PAGES-948 [Norsu] @path value in routeTemplate ... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-1028 Implement Sub-task Completed Canh Nguyen  
PAGES-1029 Review Sub-task Closed Lam Nguyen Bao  
PAGES-1030 piQA Sub-task Closed Oanh Thai Hoang  
PAGES-1031 QA Sub-task Completed Oanh Thai Hoang  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Documentation update required:
Yes
Date of First Response:
Epic Link: SaaS TPR - DevX Bugs
Sprint: DevX 30
Story Points: 3
Team: DeveloperX
Work Started:

 Description   

Step to reproduce:

  • Using hello-saas repo here
  • Add new page travel with template basic-with-site to use site aware render type
  • Open travel page detail and see the iframe load correct path:  
http://cooltravel.com/travel?mgnlPreview=false&mgnlChannel=desktop
  • Now change of travel site routeTemplate here  from @path to @name as below
routeTemplate: '/{language}{{@name}}'
  • See iframe path has website workspace as below
http://cooltravel.com/website/travel?mgnlPreview=false&mgnlChannel=desktop

Expectation: Do not include website in url. Should be like this: http://cooltravel.com/travel?mgnlPreview=false&mgnlChannel=desktop

 

Hint: May be missing switch case for NAME in DefaultSpaRouter. This is example of Path case in this PR: https://git.magnolia-cms.com/projects/MODULES/repos/pages/pull-requests/486/diff#magnolia-spa-norsu-rendering/src/main/java/info/magnolia/pages/norsu/routing/DefaultSpaRouter.java



 Comments   
Comment by Canh Nguyen [ 07/Feb/23 ]

DefaultSpaRouter supports few new properties:

  • slug, it's an alias of @name . And @name is different from name, @name is the node name and name is a content property.
  • @path and path are the same property.
  • @id and id are the same property.
  • lastModified will return the last modified date, the value is java.time.Instant#toString
Comment by Canh Nguyen [ 08/Feb/23 ]

mdrapela 👆

Comment by Martin Drápela [ 09/Feb/23 ]

canh.nguyen , will doc as part of PAGES-1035 which I ll use to first move the SPA templating properties to a new sub page cause that table is already bit too dense. (cc abrooks )

Generated at Mon Feb 12 06:24:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.