Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 421773

Summary: [sites] Selfhosting generates incorrect URL if the preferred host name is already taken
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: ClientAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 5.0   
Target Milestone: 5.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2013-11-14 13:48:51 EST
I can only reproduce if I start with no sites and create a site named 'target'.  I also have two copies of the client in my orion workspace (from two different github forks).

1) Delete all existing sites
2) Create new site named 'target'
3) Convert to self-hosting
4) Select the client code location (orion.client-2 in my case)
5) Start the site
Result:
Started at http://target0orion.eclipse.org:8080

The dot is replaced with a 0 which breaks all the links.
Comment 1 Curtis Windatt CLA 2013-11-14 16:02:50 EST
It appears that I already had a site at target.orion.eclipse.org that wasn't stopped and was deleted.  This is likely the cause as other named sites don't reproduce the issue.
Comment 2 Mark Macdonald CLA 2013-11-14 17:46:02 EST
Yep, it was a problem with the fallback URL that we use when your site's preferred URL is already taken. It is fixed now. I also added some unit tests.

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=9a56e85