U4-3071 - Affect the order of domains in GetDomains() method at umbraco.cms.businesslogic.web.Domain class

Created by wtct 09 Oct 2013, 09:31:47 Updated by Lars-Erik Aabech 10 Jun 2015, 13:35:33

Relates to: U4-6006

Relates to: U4-6691

Sometimes for root node we have to set more than one domain but only the one is very important - default domain.

When we call NiceUrl from another context (another host name and another root node) we receive URL with one of the domain. Unfortunatelly we don't have impact which domain we receive.

There is very easy way to set order of domains. We can add domain for root node in the sequence which is important for us but we need also modify one line in GetDomains method:

Instead of:

using (IRecordsReader dr = SqlHelper.ExecuteReader("select id, domainName from umbracoDomains"))

we can simply use this:

using(IRecordsReader dr = SqlHelper.ExecuteReader("SELECT Id, DomainName FFROM umbracoDomains ORDER BY Id"))

Then NiceUrl will use the same domain order for node of another context.

Comments

Sebastiaan Janssen 19 Dec 2013, 07:30:07

For reference, pull request: https://github.com/umbraco/Umbraco-CMS/pull/157


Priority: Normal

Type: Usability Problem

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 4.8.0, 4.9.0, 4.10.0, 4.11.0, 6.0.0, 6.1.0, 4.9.1, 4.11.1, 4.11.2, 4.11.3, 4.11.4, 6.0.1, 4.11.5, 6.0.2, 4.11.6, 6.0.3, 6.0.4, 4.11.7, 6.1.1, 6.0.6, 4.11.9, 6.0.5, 4.11.8, 6.0.7, 6.1.2, 4.5.0, 4.5.1, 4.8.1, 4.10.1, 4.11.10, 6.1.3, 6.1.4, 6.1.5, 6.1.6

Due in version: 6.2.0

Sprint:

Story Points:

Cycle: