I'm running multiple sites in one Umbraco instance, but have (seemingly recently) started to receive reports that users will be directed to the wrong website (still one of our websites) when links are clicked.
I've used automated software to click between the links and this does occur - the interesting part being that it is the URL of the link that is wrong, not the website that is displayed (until the link is clicked, of course).
I'm not sure why Umbraco would display one website but then populate the links on that site with the URLs of a different site seemingly at random (the automated tests showed no pattern). Has anyone else encountered this issue?
Links have also been reported wrong as in your case sometimes.
I was suspecting GetByRoute getting wrong from xml cache but not really sure.
Currently trying to understand if "HideTopLevelNodeFromPath" set to true is correct for a multisite
While site A page A is loading, Person B goes to site B (somewhere in
the world)
Umbraco somehow gets confused about this, and then serves
site B's information to Person A, instead of site A
I tested this by having a Selenium script click between two links on one site, and then I kept requesting different sites that we have in the Umbraco instance in a separate window while those pages load.
I'd be interested to hear if you can get this error to replicate using a similar method with your sites?
do you have any examples of how you render your links?
also how do you fetch the content that is rendered?
we are hosting 100 sites in a single instance, but have never heard of issues like this.
Normally urls are relative (@Model.Url => /about/us) but if you force absolute urls the protocol and domain is included in the link (Model.AbsoluteUrl => https://domain.com/about/us)
The links are generated from I believe IPublishedContent.Url as the list of links is populated from a content picker in the Umbraco back end. Maybe this is the issue?
Thank you for the replies, everyone. I have now fixed this issue (as far as I can tell), so in case anyone else thinks they might have a similar problem, I'll talk about my solution.
On some further debug probing it turns out whoever wrote the code decided to use static variables in a shared model logic class, meaning that information about different websites was being retained while it was rendering models, hence why it was serving up websites with the incorrect link URLs etc.
Once again, thank you to everyone who replied to this thread :)
Multi-site Umbraco set-up populating links with incorrect URL
Hi all,
I'm running multiple sites in one Umbraco instance, but have (seemingly recently) started to receive reports that users will be directed to the wrong website (still one of our websites) when links are clicked.
I've used automated software to click between the links and this does occur - the interesting part being that it is the URL of the link that is wrong, not the website that is displayed (until the link is clicked, of course).
I'm not sure why Umbraco would display one website but then populate the links on that site with the URLs of a different site seemingly at random (the automated tests showed no pattern). Has anyone else encountered this issue?
Kind regards, Ed
Hi, I have a somewhat similar issue with multiple sites in one Umbraco instance:
https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/97580-multi-site-randomly-wrong-content
Links have also been reported wrong as in your case sometimes. I was suspecting GetByRoute getting wrong from xml cache but not really sure. Currently trying to understand if "HideTopLevelNodeFromPath" set to true is correct for a multisite
With some testing, I think what's happening is:
I tested this by having a Selenium script click between two links on one site, and then I kept requesting different sites that we have in the Umbraco instance in a separate window while those pages load.
I'd be interested to hear if you can get this error to replicate using a similar method with your sites?
Are you using a cached partial to load your navigation?
It could be that
hi,
do you have any examples of how you render your links? also how do you fetch the content that is rendered?
we are hosting 100 sites in a single instance, but have never heard of issues like this.
Normally urls are relative (@Model.Url => /about/us) but if you force absolute urls the protocol and domain is included in the link (Model.AbsoluteUrl => https://domain.com/about/us)
The links are generated from I believe IPublishedContent.Url as the list of links is populated from a content picker in the Umbraco back end. Maybe this is the issue?
if an editor selects links from outside their own site? yes, that could be an issue
Thank you for the replies, everyone. I have now fixed this issue (as far as I can tell), so in case anyone else thinks they might have a similar problem, I'll talk about my solution.
On some further debug probing it turns out whoever wrote the code decided to use static variables in a shared model logic class, meaning that information about different websites was being retained while it was rendering models, hence why it was serving up websites with the incorrect link URLs etc.
Once again, thank you to everyone who replied to this thread :)
is working on a reply...