Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

SS auto changing 'home' to 'home-2'


6 Posts   1713 Views


12 August 2008 at 12:32am (Last edited: 12 August 2008 12:46am), Community Member, 75 Posts

Hey guys

i have a problem with SS i have a page with the url 'home-2' but when i try to change it to 'home' SS changes it back to 'home-2'.

Iv been talking on irc and checked through the cp and in the db siteTree and siteTreeLive table and there is no page with the url 'home'

Iv tried changing the url manualy in the db in both the siteTree and siteTreeLive table which fixes the problem intill the page is updated though the cms where its url gets changed back to 'home-2'

Any ideas on whats causing the problem and how i could fix it?



12 August 2008 at 1:47am Community Member, 156 Posts

I had the same problem with 2.2.2 running locally on WAMP.

In the end I just did a fresh install.


12 August 2008 at 1:55am (Last edited: 12 August 2008 2:02am), Community Member, 75 Posts

Ok thanks

That is interesting because i am also running it local on wamp

But I would prefer not to do a complete re-install because iv made a custome template and put most of the content in for a faily big site.


12 August 2008 at 7:18am Community Member, 5 Posts

Custom templates won't be deleted upon reinstall. Just for sure, make a backup of the file, but I've reinstalled a number of times and never lost any templates from my custom themes.


4 October 2008 at 5:06am (Last edited: 4 October 2008 5:07am), Community Member, 7 Posts

This appears to be a bug since I had the same problem and even deleting all records from db tables SiteTree, SiteTree_Live and SiteTree_versions didn´t help, the CMS continued renaming my home page URL to home-2 (and I was pretty sure there was no "home" URL in database).
I managed to solve the issue this way:

- Open the file sapphire/core/model/SiteTree.php
- Go to line 782 and substitute this code:

while(class_exists($this->URLSegment) || DataObject::get_one("SiteTree", "URLSegment = '$this->URLSegment' $idFilter")) {

by this one:

while(DataObject::get_one("SiteTree", "URLSegment = '$this->URLSegment' $idFilter")) {

This change will stop the CMS from renaming the home URL to home-2 and apparently has no side effect to other functionality within the CMS.

Daniel K.


4 October 2008 at 5:16pm (Last edited: 4 October 2008 5:22pm), Community Member, 36 Posts

thanks Krato...
I was with this problem 3 days...

Nuevamente Gracias, el problema solo lo solucionaba por la base de datos. pero no era la mejor solución.