silverstripe/silverstripe-subsites

URLsegments conflict sporadically

torleif opened this issue · 1 comments

Our CMS users have noticed that sometimes after saving a page in a subsite it results in a url segment change. This often breaks the subsite. For example home/ would become home-2/, and about-us will become about-us-2/

Silverstripe Versions:

    "silverstripe/framework": "4.5.3",
    "silverstripe/subsites": "2.3.3",

This problem is caused by SilverStripes CMS getExcludedURLSegments() function in SiteTree.php. This function checks for existing routes with the same name. But sadly it was not written with nested urls in mind.

For example, having a route with home/locations will block someone in the CMS from having home/ and having a route for about-us/people-finder/$ID will block CMS users from making a page called about-us/

closing as this is actually a CMS issue