ljfio / Umbraco-InvisibleNodes

Make nodes 'invisible' in Umbraco 8 and 10+
Apache License 2.0
0 stars 1 forks source link

Localized URL for root pages seems broken #5

Open greystate opened 1 month ago

greystate commented 1 month ago

Hi there 👋

I seem to have hit a bug, using this package.

When a rootnode has multiple hostnames assigned, each with their own language, getting their URL doesn't work correctly...

Example

When trying to render a language picker, we no longer get the correct URLs for the root node; e.g. Model.Root().Url("da") and Model.Root().Url("en-us") returns the same URL (/ or https://example.com/ if using UrlMode.Absolute)

If I uninstall InvisibleNodes, the URLs are correctly rendered.

[!NOTE] The URLs render correctly in the Links area on Umbraco's Info tab

I'm using Umbraco v13.3.1 and your latest (at time of writing) package release, v2.0.1

Thanks 🙌

greystate commented 1 month ago

Another note after some more testing - if the hostnames are different (e.g. by TLD or otherwise) it does seem to work correctly; so only when using the "one-level paths" version does your package seem to get the wrong idea.

ljfio commented 1 month ago

Hey @greystate, thanks for taking the time to raise this issue! You're certainly putting the package through its paces. Sorry I haven't been able to get round to this sooner.

I think I might have an idea what's going on here, will take a look and hopefully report back with some good news.

ljfio commented 4 weeks ago

Hey @greystate, I have just released v2.0.2 of the package. Are you able to try that out and let me know if this resolves the issue?

greystate commented 4 weeks ago

Hi @ljfio — I don't think it does; I get an error when I try to publish the root node when I've added the current domain and one more using the subdirectory approach - e.g.:

This is the error I get:

Screenshot 2024-06-09 at 22 44 59

--

Using different domains seems to work as expected (i.e. example.org and example.dk)

/Chriztian

ljfio commented 3 weeks ago

I released a new version v2.0.3 which I think resolves this exception being thrown. It wasn't something I had picked up in testing. Can you give that version a go and let me know?

If not would you be able to tell me if there's any additional information about the root node I might find useful (e.g. "varies by culture", have renamed the node previously, has a URL redirect).

greystate commented 3 weeks ago

@ljfio ~It looks like that did the trick 👍 Thanks again for sticking with it 🙌~

Looks like I spoke too soon, sorry! I only tested the root URLs, but now I've added a pageFolder document type and configured it to be invisible and then there's problems again.

I'll try to set up a minimal test for you later today.