[PAGES-948] [Norsu] @path value in routeTemplate should not include workspace Created: 29/Nov/22  Updated: 23/Oct/23  Resolved: 14/Dec/22

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

Type: Task Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 7h Time Spent: 7h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes PAGES-969 Prefix the paths in events sent by ex... Closed
Relates
dependency
is depended upon by MGNLFE-370 Hello SaaS - Issue with navigation in... Closed
relation
is related to PAGES-1017 Remove prefix website when using @nam... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-949 Implementation Sub-task Completed Robert Šiška  
PAGES-950 Review Sub-task Completed Canh Nguyen  
PAGES-951 Pre-Integration QA Sub-task Completed Canh Nguyen  
PAGES-952 QA Sub-task Completed Javier Benito  
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Epic Link: SPA Maintenance
Sprint: DevX 25, DevX 26
Story Points: 2
Team: DeveloperX
Work Started:

 Description   

As a developer, when using Pages app on SaaS I want the iframe to load urls that do not include the workspace, so that I can use the path directly in my SPA as I am used to. This means SPA will not need to be adjusted to work on SaaS.

We have decided to keep the JCR "workspace" name and concept on SaaS for consistancy. Implementation of Decision.

When a developer configures a page template, they configure which URL should be loaded in the iframe for the currently selected page. A typical configuration looks like this:

title: 'React: Basic 2'
baseUrl: http://localhost:3000
routeTemplate: '{{@path}}'

The IFRAME then loads the url of the `baseUrl` plus the resolved `routeTemplate`.

Expected:

The @path parameter returns the path of the currenly selected page, without the workspace. ie, no "website" at the front.

Actual:

The @path parameter returns the full Norsu path, which includes the workspace at the front of the path. In this case "website". 

Acceptance criteria:

  • Do not hardcode the solution with the name "website", it should remove whatever the first path segment is. Because in the future, pages app can edit content in other workspaces as well.
  • This should also apply when using the site templatePrototype to supply the routeTemplate.

 

Example of the issue this is causing - porting trial customer:

https://magnolia-cms.slack.com/archives/C0270PGSB1B/p1669375138388419

 


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