[PAGES-1417] SiteAwareSpaRouter does not take into account repository mapping property Created: 12/Oct/23  Updated: 26/Oct/23  Resolved: 26/Oct/23

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

Type: Bug Priority: Neutral
Reporter: Riste Drangovski Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 0.5h Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File image-2023-10-12-21-21-45-000.png    
Sub-Tasks:
Key
Summary
Type
Status
Assignee
PAGES-1418 Implementation Sub-task Completed Robert Šiška  
PAGES-1419 Review Sub-task Closed Oanh Thai Hoang  
PAGES-1420 Pre-Integration QA Sub-task Completed Chuong Doan Huy  
PAGES-1421 QA Sub-task Completed Canh Nguyen  
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
Date of First Response:
Epic Link: Support
Sprint: DevX 49
Story Points: 2
Team: DeveloperX
Work Started:
Approved:
Yes

 Description   

https://git.magnolia-cms.com/projects/MODULES/repos/pages/browse/magnolia-site-spa-rendering/src/main/java/info/magnolia/pages/spa/routing/SiteAwareSpaRouter.java#118

filter in method: info.magnolia.pages.spa.routing.SiteAwareSpaRouter#getValue
should take into account repository property of the URI2RepositoryMapping

currently it returns first mapping that is found no mater for which repository this mapping is set for.



 Comments   
Comment by Christopher Zimmermann [ 12/Oct/23 ]

Hi rdrangovski can you please provide some more details about what you are wanting to do? Which repository do you want to use? How many different repositories do you plan on using. Are you wanting to provide multiple pages apps?
And it would be great if you can provide any details like your site configuration, uri2repository mapping etc. 

I think having some concrete examplles will make it easier for everyone to invesigate and work on it.

Comment by Riste Drangovski [ 12/Oct/23 ]

Hi Toper,

the problem is that if there are multiple mappings for different repositories, where one handlePrefix property is substring of another, for example:

this will be handled by the SpaRouter in a wrong way because it will take the dam prefix instead of website prefix (dam mapping will be returned as first result).

The point is that we need to filter mapping results by the repository too, not just by handlePrefix property!

Regards,
Riste

Comment by Robert Šiška [ 16/Oct/23 ]

Hey Riste,

I think that your request makes sense. It seems we haven't considered multiple mappings within one site.

 

Thanks for clarifying.

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