[MGNLETK-20] Incorrect cross site links are generated when accessing site in multi-site configuration from default domain Created: 06/Apr/10  Updated: 03/Jul/14  Resolved: 20/Apr/10

Status: Closed
Project: Extended Templating Kit (closed)
Component/s: None
Affects Version/s: 1.3
Fix Version/s: 1.3.1

Type: Bug Priority: Major
Reporter: Jan Haderka Assignee: Jan Haderka
Resolution: Fixed Votes: 1
Labels: vpro
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

to reproduce:

  1. create new site, e.g. testSite that extends the default
  2. configure i18n for this site to have only one language (might be irrelevant)
  3. create new homepage with few subpages in the website (e.g. copy the demo-project)
  4. display this new homepage and observe the links in navigation

Result: links are rendered with the name of the site after the context and when clicking on the link 404 error is displayed.



 Comments   
Comment by Nils Breunese [ 14/Apr/10 ]

I tried magnolia-module-extended-templating-kit 1.3.1-SNAPSHOT [1.3.1-20100413.143708-1], but that doesn't seem to fix our problem.

Accessing Magnolia on localhost (not mapped for any site) the generated links still contain the name of the site definition and when following such a link I still get a big FreeMarker template error:


get(cssFiles) failed on instance of info.magnolia.module.templatingkit.style.ThemeReference
The problematic instruction:
----------
==> list model.site.theme.cssFiles as cssFile [on line 18, column 1 in templating-kit/templates/global/htmlHeader.ftl]
in include def.htmlHeader.template [on line 8, column 4 in templating-kit/templates/main.ftl]
----------


Comment by Nils Breunese [ 20/Apr/10 ]

Could the 1.3.1-SNAPSHOT build at http://repo.magnolia-cms.com/enterprise-snapshots/info/magnolia/magnolia-module-extended-templating-kit/1.3.1-SNAPSHOT/ be updated with this latest fix? We'd like to test this fix and possibly go live with it if it seems to work, because we're facing an update deadline.

Comment by Jan Haderka [ 20/Apr/10 ]

http://repo.magnolia-cms.com/enterprise-snapshots/info/magnolia/magnolia-module-extended-templating-kit/1.3.1-SNAPSHOT/magnolia-module-extended-templating-kit-1.3.1-20100420.122543-2.jar

Comment by Nils Breunese [ 20/Apr/10 ]

I see the updated jar file at http://repo.magnolia-cms.com/enterprise-snapshots/info/magnolia/magnolia-module-extended-templating-kit/1.3.1-SNAPSHOT/ but could you also please add the .pom file and update the metadata.xml so our build server can pick this up?

Comment by Jan Haderka [ 20/Apr/10 ]

yeah, there was slight issue with the permissions in repo, but it is fixed now. I have deployed new snapshot which has also fix for the MGNLETK-21.

Comment by Nils Breunese [ 21/Apr/10 ]

I just tried the 1.3.1-20100420.155205-3 snapshot. Now all internal links work (using the site definition name in the URL) and opening subpages from AdminCentral also works, but opening a site's homepage from AdminCentral fails and returns a 404. AdminCentral links to /magnoliaAuthor/<sitename>.html while the working URL for this homepage is /magnoliaAuthor/<site-definition-name>/

Comment by Nils Breunese [ 21/Apr/10 ]

P.S. This only occurs when accessing AdminCentral on a domain that is not mapped in any site definition (localhost for instance).

Comment by Jan Haderka [ 21/Apr/10 ]

I'm failing to reproduce this issue. When opening page from AdminCentral the generated URL is always /magnoliaAuthor/<pageName>.html for the home page and this renders properly. The only part that is not correct in this case is the fact that since site information is missing from URI and domain is not mapped, the i18n can't be resolved and the language selector is not displayed.

Do you get anything in the log files? Can you enable DEBUG level logging on MultiSiteFilter to see whether it get passed or not?

Comment by Jan Haderka [ 21/Apr/10 ]

I have deployed new snapshot that has a fix for language selector on the home page as mentioned above in case you want to test that, but I still don't think that would solve your problem ...

Comment by Nils Breunese [ 22/Apr/10 ]

I just tried yesterdays's snapshot (magnolia-module-extended-templating-kit-1.3.1-20100421.123641-4.jar) and it actually does seem to solve our problem. Opening a site's homepage from AdminCentral now works. The link goes to /magnoliaAuthor/<site-name>.html, but it loads. The internal link on the site generated for the site's homepage is /magnoliaAuthor/<site-definition-name/, but that one also works.

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