[MURLTRANS-4] sites mapped to a site definition have malformed links Created: 13/May/18  Updated: 27/Jun/18  Resolved: 27/Jun/18

Status: Closed
Project: URL Translation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Richard Gange Assignee: Richard Gange
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File mappings.png     PNG File site.png    
Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Pages beneath the root node suffer from malformed links when the site is mapped to a site definition.

To recreate the issue you need a site root page (or home page) with at least one child page (or section page). A site definition mapped to the root page. Two languages configured on the site definition. Both page names need to be translated.

Making a request to http://localhost:8080/magnoliaAuthor/de/home/section.html and observe the broken links in the source.

<link rel="stylesheet" type="text/css" href="/magnoliaAuthor/site-def-name/de/section/.resources/mtk/webresources/css/normalize-3.0.3.css">


 Comments   
Comment by Richard Gange [ 27/Jun/18 ]

From what I can tell the module works well up until the point you are using a site definition. I think this is the issue because once you have a mapped site definition then we start to see the name of the site definition being appended to the links.

It seems this is expected behavior when there is not a domain configuration in place. A lot of times this is the case with author, for example. If there is a configured domain then that domain is meant for public. So on the public we don't do the appending of the site def name if the request is sent with a matching domain.

Basically if you have a site definition with a configured domain and you make requests to that domain then the links are generated correctly. The problem comes in on the author side when we want to test out the links.

So how to make this work? What I have found is that you need to configure all the required mappings at your site definition. So far this seems to be resolving my issue.
Let's say I have a site that looks likes this:

Here you can see my home page has been translated to home for english and zuhause for german.
This means in my site definition I need to now map it twice.

Generated at Mon Feb 12 11:08:39 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.