Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have the following code
Node node = new Node(1234);string url = node.NiceUrl.ToLowerInvariant();Response.Redirect(url, true);
When I run this code normally (in Cassini) more often than not (like 95%) of the time get redirected to "/#", as if
node.NiceUrl == url == "#"
If I debug the code and step through it in VisualStudio, 95% of the time then the code works as expected, e.g.
node.NiceUrl == "/some-correct-url"
but sometimes I actually see NiceUrl == "#".
Why is this?
I'm using the binary ditribution of Umbraco 4.5.2 on 64Bit Windows 7 Pro, Visual Studio 2010 and SQL 2008
I'm not sure why this happens. Also had it myself a couple of times. You can use umbraco.library.NiceUrl(id) as an alternative. If that doesn't work the content might not be published correctly. Try to republish the entire site and see what happens.
Yes, I have also come across this issue, even during debugging.
The one property that consequently does have a value is Url (rather than NiceUrl).
i have this error too. extremely bizarre. umbraco.library.NiceUrl(id) does work though.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted