[MAGNOLIA-8290] Repository mapping fails in combination with Virtual-URI Created: 04/Oct/21  Updated: 04/Jul/22  Resolved: 01/Feb/22

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.17

Type: Bug Priority: Critical
Reporter: Tobias Kerschbaum Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: cs-bk, maintenance
Remaining Estimate: Not Specified
Time Spent: 1.5d
Original Estimate: Not Specified

Attachments: File config.modules.multisite.config.sites.travel.yaml    
Issue Links:
Problem/Incident
Relates
relates to MAGNOLIA-8225 Consider deprecating /server/URI2Repo... Open
causality
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 2
Story Points: 8
Team: DeveloperX

 Description   

Steps to reproduce

  1. Install a Local Environment with the Travel Demo (or use the public one)
  2. Delete the URI2RepositoryMapping for tours
  3. Import the attached config.modules.multisite.config.sites.travel.yaml for Travel
  4. Open a tour (e.g. http://localhost:8080/travel/tours/magnolia-travels/Spectacular-Ammouliani-Island.html)

Expected results

It should be no difference if the mapping for tours is done in the global URI2RepositoryMapping or in the Multisite configuration. The Tour Site should render.

Actual results

I get the 404 Page.

Workaround

Leave the configuration where it is.

Development notes

What I can say after a short debugging session is that the MultiSiteFilter already cuts the URL here.
Therefore, the VirtualUriFilter cannot find a proper match anymore [here

https://git.magnolia-cms.com/projects/PLATFORM/repos/main.pub/browse/magnolia-virtual-uri/src/main/java/info/magnolia/virtualuri/VirtualUriFilter.java#91-100]


 Comments   
Comment by Mareike Schulz [ 10/Nov/21 ]

Hey,
are there any updates on that issue? It's very important for Deutsche Bahn that this issue will be fixed as soon as possible, because we are blocked at the moment.
Thanks and regards,
Mareike

Comment by Roman Kovařík [ 18/Nov/21 ]

Could we use a real example? The tours mappings is not really used for its real purpose and should be removed, see MAGNOLIA-8225.

Comment by Tobias Kerschbaum [ 18/Nov/21 ]

I described the use case in the support ticket. Please ask them for more details if needed there.

Comment by Viet Nguyen [ 21/Mar/22 ]

This causing issue in HELPDESK-2467:

For example in 6.2.16 the following redirect worked

class: info.magnolia.multisite.mapping.MultiSiteRegexpVirtualUriMapping
fromUri: /about/abcd/
toUri: permanent:https://www.xxxx.com/au/about/
site: au-xxxx

In 6.2.17 that doesn’t work and it looks as though there is a problem with resolving the Uri’s.

Updating the redirect to the following allows the redirect to work in 6.2.17

class: info.magnolia.multisite.mapping.MultiSiteRegexpVirtualUriMapping
fromUri: /au/about/abcd/
toUri: permanent:/au/about
site: au-xxxx

But that seems to make the MultiSite redirect a bit redundant?!?

Please help consider the case, shall we fix it jsimak?

Generated at Mon Feb 12 04:31:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.