Navigation helper bug where domain root path is repeated in page slug
Permalink Browser Info Environment
We had a problem where the path of the root of a mapped domain was repeated in the slug of a page under that domain, so when the navigation helper tried to map it, it would remove it from from the page slug, resulting in a 404.
i.e.
/rogue-path/directory/rogue-path-about-page/
would be changed to
/directory/directory-about-page
We've changed the code in the navigation helper to only do this for the first instance.
In MultipleDomainsNavigationHelper, line 12 onwards
i.e.
/rogue-path/directory/rogue-path-about-page/
would be changed to
/directory/directory-about-page
We've changed the code in the navigation helper to only do this for the first instance.
In MultipleDomainsNavigationHelper, line 12 onwards
// Found target domain, so let's redirect the user there... $pos = strpos($url, $p->getCollectionPath()); if ($pos !== false) { $url = substr_replace($url, "", $pos, strlen($p->getCollectionPath())); }
Type: | Discussion |
---|---|
Status: | Resolved |
Thank you very much for this report and particularyly pointing out exactly where the problem was. We tested this and also noticed some other issues in such scenarios where the parent page path shows up multiple times in the full path.
We have went ahead and fixed these issues in the latest version that should be shortly available for download through the Marketplace.
Best regards,
Antti / Mainio
We have went ahead and fixed these issues in the latest version that should be shortly available for download through the Marketplace.
Best regards,
Antti / Mainio
End result would be
/directory-about-page