[MGNLETK-53] AdminCentral generates incorrect link to site when site definition name equals site node name (handlePrefix) and URIPrefix is not empty Created: 26/Jan/11  Updated: 18/May/17  Resolved: 04/Nov/15

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

Type: Bug Priority: Major
Reporter: Nils Breunese Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: vpro
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLETK-51 AdminCentral generates incorrect link... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

1. Put a website's content under /site in the website workspace.
2. Create a site definition with the name 'site' like this:

  • site
    • mappings
      • website
        • URIPrefix: /url
        • handlePrefix: /site
        • repository: website

3. Now try to open the website on the author instance. AdminCentral will send you to /site.html which yields a HTTP 404 Not Found error.

Our findings are that this 404 only occurs when the site definition name equals the site node name (used in the handlePrefix) and the URIPrefix is not empty. Other cases seem to work. Sadly the not working case is the one we would like to use.



 Comments   
Comment by Philipp Bärfuss [ 27/Jan/11 ]

Thanks for the report. We are trying to see if we can support this usecase. But is there a good reason for using the same name for the site configuration as in handle handlePrefix?

The problem is that the algorithm supports urls like this

  • /<site-name>/short-url

The multisite filter sets then the site (based on <site-name>) and shortens the url to /short-url.

Comment by Nils Breunese [ 28/Jan/11 ]

We have a script which allows a non-technical user to create a website in Magnolia. This user only needs to specify a title and a name for the site and everything (website tree, dms node, data node, site definition, ACL's, etc.) is automatically generated by the script. In order to be able to easily find what site definition, website tree and URL belong together they all get the same name. We could of course prefix the site definition name with something like 'sitedef-' to work around this bug, but I think it should just be possible.

Comment by Philipp Bärfuss [ 11/Feb/11 ]

When fixing the other related issues I will see if we can do something against that. But the problem is the /foo cannot have two meanings at the same time:
1. access the site foo (its root)
2. access the page foo

But it might be that we can add an extra test for this situation.

In case you are not happy with the standard mapping you can plug-in your custom SiteManager which then behaves as you whish.

You can define this manager by using a module property

Example from the ETK:

    <property>
      <name>info.magnolia.module.templatingkit.sites.SiteManager</name>
      <value>info.magnolia.module.extendedtemplatingkit.sites.ETKSiteManager</value>
    </property>
Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

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