-
Improvement
-
Resolution: Duplicate
-
Neutral
-
None
-
5.3.8
-
None
MGNLDMS-188 introduced a fallback mechanism for the DMS to check if the handle prefix had been prerended incorrectly if the request came using the complete path to the item.
Snippet from URI2RepositoryMapping getHandle() method:
try{ final Session session = MgnlContext.getJCRSession(this.repository); if (!session.itemExists(handle)) { String maybeHandle = (this.handlePrefix.endsWith("/") ? "/" : "") + StringUtils.removeStart(handle, this.handlePrefix); // prefix might have been prepended incorrectly. Second part of the condition is there to match links to binary nodes if (session.itemExists(maybeHandle) || (maybeHandle.lastIndexOf("/") > 0 && session.itemExists(StringUtils.substringBeforeLast(maybeHandle, "/")))) { return maybeHandle; } }
This creates a situation where an item in the dms could have 2 potential request URLs, which is bad for SEO. Plus the dms doesn't exist in Magnolia 5 anyway. The new DAM has its own version of the mapping class DamURI2RepositoryMapping. This class doesn't even consider a configured handlePrefix in the method getHandle(). So for these reasons we should remove this this erroneous code from Magnolia 5.
- depends upon
-
MGNLADMLEG-60 Phase out Admin-interface Legacy
- Closed
- is superseded by
-
MAGNOLIA-6882 Remove legacy code that allows to access site with duplicate prefix in the url
- Closed
- relates to
-
MULTISITE-48 When I modify the site evaluation rules I still get valid page links when added in the ckEditor
- Closed