question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Umb 8.2 - Publish with Descendants errors

See original GitHub issue

if you have an unpublished node and you attempt to publish the parent node with the Publish with Descendants option, you get an error. (most of the time, not always!)

Reproduction

Bug summary

Publishing a parent node with ‘Publish with descendants’ can cause an error:

Server error: Contact administrator, see log for full details.
No more children.

Steps to reproduce

This can be reproduced on a blank install with the starter kit, but it doesn’t always display the error (so might take two or three goes).

  1. NuGet install of Umbraco 8.2.0 ,

  2. installed via the ‘install’ (so with the starter kit)

  3. Unpublish the Todo list for this starter kit page image

  4. Attempt to publish with Descendants the ‘About us page’ image

This may work, fine, try steps 3 & 4 Again a few times and it will break.

  1. Once broken republishing the Todo List page and trying to publish descendants from About Us will still produce the result

via code, publishing a number of child nodes (but not all of them) and then attempting to publish the parent or another unpublished child node can also produce similar results - but this is a lot harder to reproduce for an issue

Expected result

The page should publish with no errors.

Actual result

The screenshot above and The logged error is :

Exception
Umbraco.Core.Exceptions.PanicException: No more children.
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.AddTreeNodeLocked(ContentNode content, LinkedNode`1 parentLink) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 1035
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.SetBranch(Int32 rootContentId, IEnumerable`1 kits) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 746
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.NotifyLocked(IEnumerable`1 payloads, Boolean& draftChanged, Boolean& publishedChanged) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 663
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.Notify(JsonPayload[] payloads, Boolean& draftChanged, Boolean& publishedChanged) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 602

I have also seen, but i am struggling to get a new installation to reproduce this one.

Umbraco.Core.Exceptions.PanicException: failed to get last child with id=-1
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.GetRequiredLinkedNode(Int32 id, String description, Nullable`1 gen) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 828
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.AddTreeNodeLocked(ContentNode content, LinkedNode`1 parentLink) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 986
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.SetBranch(Int32 rootContentId, IEnumerable`1 kits) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 746
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.NotifyLocked(IEnumerable`1 payloads, Boolean& draftChanged, Boolean& publishedChanged) in d:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 663

This item has been added to our backlog AB#3239

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
nul800sebastiaancommented, Oct 18, 2019

For people who need a quick fix before we can do a proper release of 8.2.1: attached is an 8.2.0 dll, with just this fix applied on top of it, you only need to replace this one dll and it should be fixed for you:

Umbraco.Web.dll.zip

1reaction
stevemegsoncommented, Oct 15, 2019

I think these are reliable steps to reproduce both errors. For “No more children”:

  1. Unpublish a “middle child”
  2. Save and publish it
  3. Publish it with descendants
  4. Repeat steps 2 and 3

For “failed to get last child”:

  1. Unpublish a last child
  2. Save and publish it
  3. Publish it with descendants
  4. Repeat steps 2 and 3

It does seem to be related to resetting the sibling IDs in RemoveTreeNodeLocked. When the node is saved and published after unpublishing, the version with the sibling IDs set to -1 is found as the existing version, and its sibling IDs are copied to the new generation.

With the sibling IDs broken, when publishing with descendants we either fail to find the right place in the sort order as in #6419, or we copy the -1 from PreviousSiblingContentId to the parent’s LastChildContentId in RemoveTreeNodeLocked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

v8.2.1
UmbracoCms.8.2.1.zip ... Bugfixing on the 8.2.0 release. ... 6698 - Umb 8.2 - Publish with Descendants errors · 6754 - Statuscode attribute ...
Read more >
content editor - Not publishable warning on descendant items
We have recently moved from Sitecore 6.6 to 8.2. In Sitecore 6.6, if the parent item is marked as "Never publish" I get...
Read more >
Exhibit 1
Section 8.2. Section 8.3. Section 8.4. Section 8.5 ... immediate family. any of Mr. Rudey's lineal descendants and any member of such lineal....
Read more >
CS697 Class Notes
Documentation License, Version 1.3 or any later version published by ... Dynamic programming minimizes the re-computation of sub-problems.
Read more >
Untitled
Primul telefon mobil aparut, Decoupage sarah kay, Cisco surgical instruments, Error 405 method not allowed iis 8, Immaturi il viaggio streaming youtube, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found