[PAGES-579] SPA: Support templating in baseUrl Created: 28/Mar/22  Updated: 28/Jun/22  Resolved: 06/Apr/22

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

Type: Improvement Priority: Critical
Reporter: Matt Rajkovic Assignee: Canh Nguyen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1.5d
Original Estimate: Not Specified

Issue Links:
duplicate
is duplicated by PAGES-578 SPA: Support dynamic hostname in base... Closed
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)
Epic Link: SaaS TPR - SPA
Sprint: DevX 7
Story Points: 3
Team: DeveloperX

 Description   

Context:

This is blocking editors from being able to edit websites. Now developers haave to do the edits since they have the SPA running locally.

 

Shared by Josh Beckerleg from D&G: 

*Full video with problem statement: https://www.loom.com/share/4dd747889c1d4fa2929fe4e742e02268*

My node has these properties

@path: "/dgx-beko-registration/appliance-details"
domain: "beko.partners.dandg.uk.euw1.test.test.athome.domgentest.cloud"
applicationPath: "/register"

Im trying to load up the test site for this page in magnolia editor.
 
In the page template definition. This works:

baseUrl: https://beko.partners.dandg.uk.euw1.test.test.athome.domgentest.cloud
routeTemplate: /register/appliance-details 

But this does NOT: 

baseUrl: https://
routeTemplate: beko.partners.dandg.uk.euw1.test.test.athome.domgentest.cloud/register/appliance-details

Im asking because we are trying to do this. Which is giving us the double magnolia thing.

baseUrl: https://
routeTemplate: "{{domain}}{{applicationPath}}/appliance-details" 

Ive been digging around. Here:
https://git.magnolia-cms.com/projects/MODULES/repos/pages/browse/magnolia-spa-rendering[…]java/info/magnolia/pages/spa/routing/DefaultSpaRouter.java
Guessing that the PATTERN property strips everything that isnt in that regexp? So the '.' characters are dropping in the routetemplate?
 
Is it possible to extend the replacer logic to the baseUrl as well? That way I can get the full value in without it being stripped by the path regexp?


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