Nested Contet publish with children issue
# help-with-umbraco
c
Anyone seen an issue with Nested content where you can publish a page and children individually without any probs, but if you try and publish with descendents it throws an error? The individual descendants all publish fine, but the root page won't publish. I have a feeling it might be index related, I'm going to try a few things, see if I can get it working
k
What's the error when publishing-with-descendants, if you check the logs? Do you mean this? https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/nested-content Or just pages with subpages?
c
#That's waht it looks like - but that's not the behaviour I'm seeing - eg I'm able to publish all individual nodes in a page fine, but when I try and publish them all together it fails.
but if I publish them all individually, I'm then able to publish the page without any probs Of course that's totally useless, but it suggest that validation isn't happening in the same way between pages and individual nodes https://cdn.discordapp.com/attachments/1260991819718725673/1262341643202334720/image.png?ex=66963ec4&is=6694ed44&hm=4a2c9780e96b987970f0229d7750d162c18d4db32692d3ddb401465bfa722f83&
My next question is then - are there any other ways of programatically publishing a bunch of pages?
and skipping over the ones which fail? Not that I've seen any fail when individually published
I'm getting a kicking from my clients that we can't publish 600 + pages manually, particularly as these are created dynamically from an API - and given these publish just fine one at a time. It doesn't look like there's any way to programatically publish pages - so any ideas would be welcome 😦
s
Could you write a simple test controller and publish it that way (or mockup in a Macro/Page if you're a wild-kid). Get children by ID Loop children with a try/catch
I'm assuming performance isn't really a concern here.
c
That's just it - Creating and saving the content isn't the issue, contentService handles that fine - but I couldn't find any v8 services I could call to publish content - unless I totally missed it. The UI calls umbraco/backoffice/UmbracoApi/Content/PostSave whic I'm trying to now trace my way through.
If there IS a publishing service, it's well hidden in the docs
OK - wow, I totally missed that but. IContentService has a Save as well as a SaveAndPublish šŸ¤¦ā€ā™‚ļøšŸ¤¦ā€ā™‚ļø
Except that doesn't work, and throws an exception, probably the same issue with the back office
While I can still publish fine on a node-by-node basis from the back office
šŸ¤·ā€ā™‚ļø
m
Have you tried replacing the value converter with a copy of the original one so you can step through and see what's null?
r
Did you do a deep dive into one of the content items that threw the error? Probably unrelated, but the last time I had something like this happen the data in the database for the property was borked (after I changed something from an int to a string)
c
That's basically what I'm doing now - digging down and re-building the content until it borks. It's just really weird that it publishes fine in the back end but not through the API. Just a bit of a pain
48 Views