Just want to chek if there are any more info about this.
I have the same problem, and Ismail's suggestion works fine (using umbraco.Library.NiceUrl), we added a extension method. But is the "bug" submited as a bug, Can any one use Node.NiceUrl on 4.52 (.net 4.0)?
We have tried lots of diffrent thigs in config, republishing etc etc but no luck.
I had pretty much this identical bug, except for that the Node.NiceUrl worked for the FIRST item in the repeater loop, and spit out # for the rest.
Switched to library.NiceUrl(id) and it works perfectly now.
Wasted almost 2 hours and probably took a few years off my life in frustration with this one. Argh.
I would imagine this has to be a bug? I republished everything, and checked that the url does show up correctly for the nodes under the content tree.
I wonder if this could have something to do with the issue, because I've used Node.NiceUrl everywhere else in the site with no issues--In my case I had a nested repeater inside the main one. In the OnItemDataBound event of the first one, I bound the nested one to the children of the current node of the outer one.
Node.NiceUrl worked for the FIRST iteration on the outermost repeater, and for the first iteration only of the nested repeater for each outer repeater iteration (both repeaters displayed Node.NiceUrl).
niceurl returns # value
i have the followint repeater in a usercontrol:
<%@ Import Namespace="umbraco.presentation.nodeFactory" %>
<asp:Repeater id="rptSubProductMenu" runat="server">
<ItemTemplate>
...<div class="subCategoryPorductMenuOption">
<a href="<%#((Node)Container.DataItem).NiceUrl %>">
<%#((Node)Container.DataItem).Name %></a>
</div>
</ItemTemplate>
</asp:Repeater>
the niceUrl property is returning as a '#' on all of the results. Is there something i am missing here?
Phil,
Not sure if .NiceUrl (think its a bug) works you may want to goto umbraco.library.NiceUrl(((Node)Container.DataItem).Id)
Regards
Ismail
Ismail's suggestion could be the solution (90% sure 'bout that), but just in case, double check if the nodes are published correctly.
(Because I have seen nodes in the back-office which weren't published correctly and had a '#' as URL)
thanks ismail, your suggestion worked.
Hi
Just want to chek if there are any more info about this.
I have the same problem, and Ismail's suggestion works fine (using umbraco.Library.NiceUrl), we added a extension method. But is the "bug" submited as a bug, Can any one use Node.NiceUrl on 4.52 (.net 4.0)?
We have tried lots of diffrent thigs in config, republishing etc etc but no luck.
/Jonathan
A quick look in nodeFactory...
vs.
Should not the NiceUrl property also use the Id not _id (witch can be in a state - not initialized)
And why is ther both a Url and a NiceUrl property?
Reproducing the error:
Results in my case in:
#- /WWW/archive.aspx #- /WWW/about-blogger.aspx #- /WWW/2010.aspx
Jonathan
I had pretty much this identical bug, except for that the Node.NiceUrl worked for the FIRST item in the repeater loop, and spit out # for the rest.
Switched to library.NiceUrl(id) and it works perfectly now.
Wasted almost 2 hours and probably took a few years off my life in frustration with this one. Argh.
I would imagine this has to be a bug? I republished everything, and checked that the url does show up correctly for the nodes under the content tree.
I wonder if this could have something to do with the issue, because I've used Node.NiceUrl everywhere else in the site with no issues--In my case I had a nested repeater inside the main one. In the OnItemDataBound event of the first one, I bound the nested one to the children of the current node of the outer one.
Node.NiceUrl worked for the FIRST iteration on the outermost repeater, and for the first iteration only of the nested repeater for each outer repeater iteration (both repeaters displayed Node.NiceUrl).
is working on a reply...