I have been fighting with Umbraco today and I cannot work out what is going wrong. I have upgraded an Umbraco 13 site to Umbraco 17. I used uSync migration and had great success with all the content not breaking anything and code upgrades have gone well.
But every time I re-start the website locally I get the following screen:
I can then republish the home node and the home works again.
I then created a fresh website, fresh umbraco 17 install, I used usync to copy the document types across and then only created the home node… and again this issue reared its head.
Has anyone else come across this? I have upgraded multiple other websites to U17 all 100% successfully… this one is going a bit pete-tong!
Have you tried rebuilding the database cache in the backoffice Settings? Are the pages in the CMS unpublished, or published just not in the cache? Any errors in the Umbraco log?
Thanks Steve, but sadly it’s not that the home is never appearing. The homepage loads correctly when I publish, but then after a restart of the project Umbraco believes the home page is unpublished. But in backoffice it shows the Url. Publish the Home node and the home node starts working…weird.
Now what I am seeing from my testing is this might be down to the Languages and routes. I am currently testing this theory by starting again and being tidy with Languages.
If you manage to figure anything out, please update the existing issue that @pc-pdx linked so that HQ can look into this if indeed it is related and is the same issue.
I asked AI for it’s thoughts and this is what it came back with… not sure if any of that helps?
The languages theory sounds plausible to me. From v15 onwards, URLs live in the umbracoDocumentUrl table, keyed by document key and language ID, and get reloaded at startup. Republishing writes fresh rows, which would explain why a publish fixes it but a restart breaks it again: the startup path is either failing to load those rows or not matching them.
Things I’d suggest he checks:
Compare the URL table before and after a restart. Query umbracoDocumentUrl for the Home node’s key after publishing, then again after restarting. If the rows survive but the route still fails, it’s a lookup or matching problem. If they’ve gone, something is rebuilding or clearing them on boot.
Check umbracoLanguage for oddities. Look for:
more than one language marked as default
duplicate ISO codes
a default language that changed after content was published
Invariant content is stored against the default language ID, so a mismatch there would cause exactly this. uSync migrations from 13 can leave languages in a slightly odd state.
Check culture and hostnames on the Home node. A domain assigned to a culture that’s missing, non-default or duplicated could break routing after a cache reload.
Look for custom URL segment providers. Any custom IUrlSegmentProvider (his own code or a package) matters, because I believe a change in providers triggers a URL rebuild at startup. It’s worth confirming nothing nondeterministic is in there.
Look for a second instance sharing the database. Another local instance, or a scheduled-publishing or server-role misconfiguration, could be triggering cache rebuilds he isn’t expecting.
Turn on debug logging for the URL service at startup. Setting Umbraco.Cms.Core.Services to Debug should show whether a rebuild runs and what it does.
Try a minimal repro. He already reproduced it on a fresh install with synced doc types. Next, try a fresh install with only the default en-US language, one invariant Home doc type, and nothing synced. If that works, add languages back one at a time.
If he does pin it down, the before-and-after rows from the URL table along with his language setup would be the most useful thing to add to #23234.
umbracoDocumentUrl - this table appears to be the issue. It is not getting populated. I manually populated it with my site’s homepage and the home page now consistently works. Now how to fix that…