-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent url generation when some of the languages do not have domains set #10827
Comments
Thanks for reporting @lauraneto! I've labelled v9 so we can get a look at it Emma |
I unlabeled, when it is also a bug in v8. 🙈 |
Thanks @lauraneto for your thorough description. Unfortunately I have nothing great to tell you, this is all "expected behavior". We can not change the way URLs are generated since any change that we make now will break something for someone who is expecting the current behavior. All we can do is workarounds that you seem to have already found. Now, I apologize but I didn't read every detail of this issue, but I think the only thing you're currently experiencing that is not to your liking is that Did I miss anything else? When you set up hostnames on the relevant nodes, I think you've found that everything that you need to do works, is that correct? |
The IsPublished(culture) returning true while the backoffice says otherwise might have something to do with this issue: #10695 And I see it correctly, you want your main language to use / and the nl-nl one to use /nl? Wouldn't adding an domain with value / for en-GB do the trick here? |
@nul800sebastiaan I've tried to address the issue in my PR. It is of course possible that we are breaking some code built around undefined behavior, but if so, we can try to accommodate it. And I think with the framework change Umbraco 9 would be the release to do it. I think the PR results in behavior that is much closer to what is expectable. |
@nul800sebastiaan I think the main issues for me here are:
@patrickdemooij9 Yes, I know that if I add a domain with value The above PR seems to fix the random url behavior and it makes the messages in the backoffice behave as I would expect. |
Hiya @lauraneto, Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more. We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed). To open it this issue up again, you can write For example:
This will reopen the issue in the next few hours. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
9.0.0-rc001
Bug summary
If I have a multi-lingual website, and I publish a node in multiple languages but only setup the domain for some of them, I get inconsistent behavior when trying to retrieve the url (both in the backoffice and by using
.Url(culture)
).This is also reproducible in
8.15.1
.Example:
Languages:
en-US
(main),nl-NL
,pt-PT
Domains: Only
/nl
-nl-NL
is setRoot node:
nl-NL
:/nl
en-US
:/nl
(but accessible through/
)pt-PT
:This item is not published
(but if I do.IsPublished(culture)
I gettrue
)nl-NL
:/nl
en-US
:/nl
(but accessible through/
)pt-PT
:/nl
Child node:
nl-NL
:/nl/nl-content
en-US
:This document is published but its URL cannot be routed
(but accessible through/content
)pt-PT
:This item is not published
(but if I do.IsPublished(culture)
I gettrue
)nl-NL
:/nl/nl-content
en-US
:/nl/nl-content
(but accessible through/content
)pt-PT
:/nl/nl-content
Specifics
No response
Steps to reproduce
node.Url(culture)
. You can also try to usenode.IsPublished(culture)
and check that some that haveThis item is not published
showing in the backoffice, are actually considered published).Expected result / actual result
I would expect that if I only have an
nl-NL
domain setup, that my main language would have url/
and not the same url asnl-NL
, since it's possible to access it through/
.Regarding the rest of the languages, I'm not sure what the behavior should be but I think that showing
This item is not published
can be misleading and I would expect to seeThis document is published but its URL cannot be routed
instead.I would also expect to have a simple way to check if the node in a certain culture is routable or not through code.
The text was updated successfully, but these errors were encountered: