I have created a navigation control that sets links to the URL for pages equal to the umbracoUrlAlias value if it exists and NiceUrl() if it doesn't. In the process I noticed that a lot of the links to umbracoUrlAlias values were throwing 404s. A link to a page's umbracoUrlAlias value that contains any capital letters will throw a 404. However, if I set the umbracoUrlAlias value to be all lower-case, it works.
Is this a known bug? Is there a fix? I'm using Umbraco 4.5.2.
it's by design, all url's are saved as lowercase and xpath queries to find a document (such as the FindByAlias not found handler) will try to do an exact match on the document's property (umbracoUrlAlias)
Can it be fixed? Probably so, as it's just a matter of upper- or lower casing the request before doing the actual xpath query. If you'd like to have this included in the core, add a work item on Codeplex and vote for it.
Meanwhile, you could lower case your alternate url, or if you're not sure whether editors will be able to do so, write an event handler on save of a document and rewrite the alternate url to lowercase.
umbracoUrlAlias only works when lower-case?
I have created a navigation control that sets links to the URL for pages equal to the umbracoUrlAlias value if it exists and NiceUrl() if it doesn't. In the process I noticed that a lot of the links to umbracoUrlAlias values were throwing 404s. A link to a page's umbracoUrlAlias value that contains any capital letters will throw a 404. However, if I set the umbracoUrlAlias value to be all lower-case, it works.
Is this a known bug? Is there a fix? I'm using Umbraco 4.5.2.
Thanks,
Matt
it's by design, all url's are saved as lowercase and xpath queries to find a document (such as the FindByAlias not found handler) will try to do an exact match on the document's property (umbracoUrlAlias)
Can it be fixed? Probably so, as it's just a matter of upper- or lower casing the request before doing the actual xpath query. If you'd like to have this included in the core, add a work item on Codeplex and vote for it.
Meanwhile, you could lower case your alternate url, or if you're not sure whether editors will be able to do so, write an event handler on save of a document and rewrite the alternate url to lowercase.
Hope this helps.
Regards,
/Dirk
is working on a reply...