We have moved to GitHub Issues
Created by Matt Brailsford 06 Feb 2014, 12:17:00 Updated by Daniel Bardi 25 Feb 2015, 08:41:41
Relates to: U4-4043
Relates to: U4-3753
The current method of retrieving a nodes language is to use Domain.GetDomainsById(int id).Language. The problem is, if you don't define a domain when setting up the language, Umbraco creates a wildcard domain for you, which seem to be excluded by GetDomainsById() (GetDomainsById() calls GetDomains() which calls an internal method GetDomains(bool includeWildcard) with the includeWildcard param set to false).
There needs to be either access ALL domains, including wildcards, or there needs to be another way to get the languages.
Good catch, will fix.
While waiting for U4-4043 to be completed, I propose the following fix on the old API:
1/ Make Domain.GetDomains(bool includeWildcards) public so it becomes possible to get ''all'' domains, including the wildcard domains (that can be identified by their IsWildcard property).
2/ Add method Domain.GetDomainsById(int nodeId, bool includeWildcards) so it becomes possible to get ''all'' domains set on a given node, including the wildcard domain if any (that can be identified by its IsWildcard property).
If that seems OK I'll push today. Thoughts?
Sounds like a fair interim fix to me.
@zpqrtbnk Did you ever push this fix?
Sure that would be 83736be initially in 6.2 and later on merged into 7.1 by Shannon. Forgot to close the issue, but considering it fixed.
Please fix this: http://issues.umbraco.org/issue/U4-3753
Backwards Compatible: True
Affected versions: 7.0.3
Due in version: 7.1.0