Umbraco-cms: U8.x: umbracoUrlAlias comma separated list is taken literally.

Created on 9 Jul 2019  路  14Comments  路  Source: umbraco/Umbraco-CMS

Not sure if this is a bug. Feels like a display bug.
When having a property umbracoUrlAlias as a textstring. Having comma separated routes are displayed and clicked through as literal and not as individual routes. This happens in v8.02 and v8.1.

UmbracoUrlAlias

I expect it not to 404 and to create two separate lines in the info tab. manually typing /gold or /golden does work. So it's not the routing that's failing. It's the display of multiple routes on the info tab that's buggy.

communitpr releas8.4.0 typbug

All 14 comments

Hey @bmargevicius - umbracoUrlAlias supports a single alias only, so this is expected behavior. I would look into IIS rewrite rules if you need to redirect multiple URLs to a single content item.

Not according to documentation @nul800sebastiaan
umbracoUrlAlias
This property when created as a text string lets you provide a comma separated list of alternate full URL paths for the node. For example, if your URL was /some-category/some-page/content-node, by adding an umbracoUrlAlias of "flowers", a user can navigate to the node by simply going to /flowers. The URL alias remains in the browser address bar as a 'mask' over the real URL. You can also specify paths like "flowers/roses/red".
ref: https://our.umbraco.com/documentation/Reference/Routing/routing-properties
ref: https://github.com/umbraco/Umbraco-CMS/issues/5782

You'll note that this documentation requires an update for v8 though. 馃槄

Ah, we're for some reason not showing the banner on this page that this is not up-to-date documentation. That's unfortunate.

So it's not supported anymore? This is weird, because the comma separated routes actually work.

@nul800sebastiaan Really? It was a pretty useful feature to add many aliases to one page. Is it really necessary to delete the feature?

I hoped alias would be improved in v8, like make it as repeatable textstrings to be more obvious to user.

:(

Well, I'll go be ashamed in a corner. I would've sworn this feature was removed. But nope, all good! It's just the URLs that are displayed wrong on the info tab. My bad, forget I said anything! 馃檲

We'd love some help getting the URLs to display correctly if you can.

I've marked this as "Up for grabs" so that you or someone else coming along could create a pull request for it.

Get the cone of shame.
giphy

No worries. Now that we're open for discussion. @ReVoid asked for more of an IEnumerable<string> experience. I don't like parsing strings either.

馃槀

Sounds alright, but then it suddenly needs to be a custom property editor. It was nice that it was just a text string..

Also, let me challenge you on why you would want to use this at all as I don't understand. You know that Google / search engines punish you for having duplicate content on your site. Why do you actually needto be able to do this? I'm asking out of ignorance, not because I'm trying to be a wise-ass.. I probably missed something so I'm curious to learn more.

I guess a shopping/eCommerce site could be another example of where you want the same content to lie under different urls.
/products/super-cone = canonical, and where data entry happens in the backoffice
/medical/cone/of/shame/super-cone
/veterinary/cone/of/shame/super-cone

I guess the general case is: You want content to live in two spots, and you have a canonical url that's not desirable(?).

@bmargevicius

I don't like parsing strings either.

As everybody does. Everybody like cakes, not a string parsing, right? 馃構

@nul800sebastiaan

lso, let me challenge you on why you would want to use this at all as I don't understand. You know that Google / search engines punish you for having duplicate content on your site.

I am not a SEO-guy at all, but I guess, using canonnical urls solves the problem, it is like to tell Google "Hey, Goo, here is my real page here at cannonical url, it is the same at that url, do not index it again, please". Here more about.

I remember a single personal case with multilingual site, I wanted page to be avaliable as two similar urls like unicorns.com/eng and unicorns.com/en

Ain't that funky. PR in #5875 fixes the issue at hand; supporting IEnumerable<string> should be considered and handled in a separate issue.

Fixed in #5875

Good, but what about v7 branch? There is the same issue

Was this page helpful?
0 / 5 - 0 ratings