We haven't made any changes to controllers or UmbracoAuthorizationApi or anything else we can think of that could have caused this. Does anyone have any pointers for where to start looking?
It's also a longshot but I'm just wondering if for some reason the localhost has been added as a hostname on your live environment by mistake - Right click on the homepage note and select "Culture and hostnames" and see what has been configured there - Does it look allright?
Hi Jan
No configuration there at all - those domains are all configured in our Azure hosting. I could add them here as well, as long as that doesn't cause any conflict?
Ok that sounds weird - But as long are you're only running one site in Umbraco there usually are no conflicts when fetching content etc. but if you did a multilingual site then you would need to add the hostname to let Umbraco now, which site to serve, when visiting domain a or b for instance.
So it's considered a best practice to always add the hostname in Umbraco too. So let's give that a try and see if that's the cause of the issue. It safe to add the domain - But you should not add localhost though!
Mind posting a screendump of what your settings look like once it's done?
Hi Jan
I set the hostname as suggested on our devleopment environment; however that caused its own issues because when we then run localhost on this instance the page urls change from localhost://pagename to domain-name/pagename.
However, the original invite error itself seems to have stopped occurring. I will continue to monitor this and update this post if I solve it.
I can implement your solution on our production and test environment, as localhost is never run off those instances
Are you currently running the same database locally as you are on the live environment? Otherwise I can't get why the domain name changed on your local instance too - If you're sharing the database then it's probably a good idea to run separate database instances for localhost/test and live.
Then you can have your localhost and test domains setup in the dev database and the live domain on the live database.
I hope this makes sense. And sorry if I misunderstood what you wrote above and you're already running your setup like this - I was just not sure :)
Fingers crossed that you will manage to get it solved!
Hi Stefan
We have had another random instance of this today where instead of ourdomain.azurewebsites.net/umbraco/VerifyInvite?invite=[code] it is sending to ourdomain/umbraco/VerifyInvite?invite=[code].
In other words it'd dropping the azurewebsites.net hostname entirely from the url.
I believe it comes from setting the Umbraco Application domain in the UmbracoSettings.config, else the website uses what ever it has identified as the application url by "guessing" the domain during startup.
We recently experienced this as well on live sites which generated the url with localhost. We are running V8 within Umbraco Cloud hosting.
We are considering adding transforms to explicitly set umbracoApplicationUrl for the umbracoSettings.config
@umbracoApplicationUrl
The url of the Umbraco application. By default, Umbraco will figure it out from the first request.
Configure it here if you need anything specific. Needs to be a complete url with scheme and umbraco
path, eg http://mysite.com/umbraco. NOT just "http://mysite.com " or "mysite.com/umbraco" or "http://mysite.com".
New users invite link broken
Recently we've had an issue whereby when we invite new users to our environment, the link they receive from Umbraco is to http://localhost/umbraco/VerifyInvite?invite=[long string] instead of http://our.domain/umbraco/VerifyInvite?invite=[long string]
We haven't made any changes to controllers or UmbracoAuthorizationApi or anything else we can think of that could have caused this. Does anyone have any pointers for where to start looking?
Hi Paul
That sounds very odd - What version of Umbraco are you running and, which changes have been made to the site when this started to happen?
It's not because the hostnames on your Umbraco rootnode has suddenly been lost or something like that?
/Jan
Hi Jan Sorry for delay in replying. We're running 7.7.9. I don't believe there's anything going on with the hostname. How should I confirm this?
Hi Paul
It's also a longshot but I'm just wondering if for some reason the localhost has been added as a hostname on your live environment by mistake - Right click on the homepage note and select "Culture and hostnames" and see what has been configured there - Does it look allright?
/Jan
Hi Jan No configuration there at all - those domains are all configured in our Azure hosting. I could add them here as well, as long as that doesn't cause any conflict?
Hi Paul
Ok that sounds weird - But as long are you're only running one site in Umbraco there usually are no conflicts when fetching content etc. but if you did a multilingual site then you would need to add the hostname to let Umbraco now, which site to serve, when visiting domain a or b for instance.
So it's considered a best practice to always add the hostname in Umbraco too. So let's give that a try and see if that's the cause of the issue. It safe to add the domain - But you should not add localhost though!
Mind posting a screendump of what your settings look like once it's done?
/Jan
Hi Jan I set the hostname as suggested on our devleopment environment; however that caused its own issues because when we then run localhost on this instance the page urls change from localhost://pagename to domain-name/pagename.
However, the original invite error itself seems to have stopped occurring. I will continue to monitor this and update this post if I solve it.
I can implement your solution on our production and test environment, as localhost is never run off those instances
Thanks for your suggestions
Paul
Hi Paul
Are you currently running the same database locally as you are on the live environment? Otherwise I can't get why the domain name changed on your local instance too - If you're sharing the database then it's probably a good idea to run separate database instances for localhost/test and live.
Then you can have your localhost and test domains setup in the dev database and the live domain on the live database.
I hope this makes sense. And sorry if I misunderstood what you wrote above and you're already running your setup like this - I was just not sure :)
Fingers crossed that you will manage to get it solved!
/Jan
Thank Jan Yes, we have that setup localhost and develop -> dev database test -> test database live -> live database
Had the same issue today with umbraco v8.7.2 hosted on Azure Web Apps. Weird stuff.
Hi Stefan We have had another random instance of this today where instead of ourdomain.azurewebsites.net/umbraco/VerifyInvite?invite=[code] it is sending to ourdomain/umbraco/VerifyInvite?invite=[code].
In other words it'd dropping the azurewebsites.net hostname entirely from the url.
Did you find out any more?
Hmm no unfortunately not :-(
I believe it comes from setting the Umbraco Application domain in the UmbracoSettings.config, else the website uses what ever it has identified as the application url by "guessing" the domain during startup.
Nik
Yeah I think so too, but this is a genuine bug because the application isn't running on 'localhost'. Might need some fixing in the core.
I've seen on Azure it sometimes picks it up as localhost if not explictly set, but I can't remember what version of Umbraco I've seen that on.
We recently experienced this as well on live sites which generated the url with localhost. We are running V8 within Umbraco Cloud hosting.
We are considering adding transforms to explicitly set umbracoApplicationUrl for the umbracoSettings.config
@umbracoApplicationUrl The url of the Umbraco application. By default, Umbraco will figure it out from the first request. Configure it here if you need anything specific. Needs to be a complete url with scheme and umbraco path, eg http://mysite.com/umbraco. NOT just "http://mysite.com " or "mysite.com/umbraco" or "http://mysite.com".
is working on a reply...