Here’s a simplified version of my Content tree.
- Content
- Articles
- Article 1
- About Us
Let’s assume I add 2 nodes, one as a child of Articles and the other at the root level. My tree would now look like this.
- Content
- Articles
- Article 1
- Article 2
- About Us
- Terms
Both Article 2 and Terms are saved to the umbracoNode table with “level” set to 2. This is not the correct level for Terms; it’s level should be 1.
This is causing publishing to fail, specifically at umbraco.cms.presentation.editContent.Publish:
if (_document.Level == 1
|| new cms.businesslogic.web.Document(_document.Parent.Id).Published)
{
// Code that publishes the node
}
What’s happening is that since level DOES NOT equal 1, it evaluates the 2nd part of the conditional. Once the Document is instantiated with the current node’s parent id (-1), it checks for cmsContentVersion entries with that id. However, it’s the root node, and nothing exists in cmsContentVersion for the root, so it goes kaboom.
A few things that may or may not be of interest:
- We are in the process of upgrading from v3.6 -> v4.7
- Right-Clicking the node and publishing works
- The link to the document after right-clicking and publishing is simply
#, which is also incorrect. I’m unsure if this is related or not.
Any help would be greatly appreciated.
The fix actually ended up being pretty simple, hope this saves someone a headache.
I simply had to update
levelto 0 for the root note (it was 1 prior to udpating it).I assume this was some artifact of version 3 that, for some reason, wasn’t addressed earlier in the upgrade.