We have moved to GitHub Issues
Created by Michael Sølvsteen 08 May 2017, 12:08:03 Updated by Arjan Hoogervorst 26 May 2017, 12:12:42Tags: PR
Relates to: U4-9897
Subtask of: U4-9609
Just installed Umbraco 7.6 and set up a "Site"-documenttype, with a ContentPicker property for picking the actual frontpage to be displayed. I've set the alias of the property to "umbracoInternalRedirectId", which should make the frontpage appear, without the url changing.
The issue is, that the new ContentPicker2 is saving the data in the database as "umb://document/....." but it expects an integer. If I change the propertyeditor to a numeric field, it works like a charm.
It looks like the int parsing is happening right here: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/Routing/PublishedContentRequestEngine.cs#L531
I've also noticed this and a similar issue with the umbracoRedirect property.
I've submitted a PR for this: https://github.com/umbraco/Umbraco-CMS/pull/1942
Great work James.
I was thinking why you have two convert-attempts, when only one of them is used?
By putting your try-convert code in a new method you should be able to
var a = tryConvertToInt(); if(a.Ok) return a.Value;
var b = tryConvertToUdi(); if(b.Ok) return b.Value;
I Also belive there is a setting for what kind of id is in use.
Thanks! I mades some changes as Søren suggested. https://github.com/umbraco/Umbraco-CMS/commit/22d778ed28c1ee6e9182d05a32210e1754afd6be
Backwards Compatible: True
Affected versions: 7.6.0, 7.6.1
Due in version: 7.6.2