Umbraco 13.9.2 (uSync 13.2.7) - pages left 'Published (pending changes)' after content import.
Describe the bug Page sometimes do not end up fully published on import.
To Reproduce We have quite a lot of content nodes (10k) that when we move them between environments it appears to import and show the details of changes and fields which should have changed, however when we navigate to the node it shows as 'Published (pending changes)'
The nodes were marked as published previously in both the system we were taking from and the one we were updating.
Expected behavior I was expecting them to be the same state.
About your Site (please complete the following information):
- Umbraco Version: 13.9.2
- uSync Version: 13.2.7
Additional context We've been struggling with this for a little while trying to figure out what is going on, then I stumbled upon this and wondered if it could be related: https://github.com/umbraco/Umbraco-CMS/issues/17023
I wasn't sure if this also affected uSync.
We have to use LTS versions so it isn't an option to move up versions just yet.
Hi,
I don't think this will be related to that issue, uSync doesn't trigger the publish on a nonfiction, rather the content should be published as part of the sync process.
Published (Pending changes) implies that something is saving changes to the content after the publication happens.
If you are syncing things with usync then it will save changes, and then it will publish (it's the last step in any bit of content). but this will trigger all of the internal Umbraco notifications (Saved, Saving, published etc).
So, if you have any code that might do things with those notifications then maybe they are altering the content in some way then that would save a change and published content would no longer be the latest bit of content and would be pending changes.
the only thing uSync does post publish is attach any scheduled publish/unpublish dates to items if any exist (which require the content to exist, so have to happen after we have created it). as these don't change the content and are often the thing that then publishes content at a certain time they don't alter the state as far as i can tell)
Thanks for the quick response.
I'll double check our notification handlers, I had tried to add a setting to our appsettings file to disable them for the usync import but I may have missed some.
It's a bit of a head scratcher, as the items seems to import and the details show the changes to field we're expecting, but the data then doesn't seem to be there. Perhaps I'm clutching at straws with the publish state, I'm not sure yet.
For part of it our content is being updated from NestedContent to BlockList in the files we've copied into the other environment and we have a Hangfire task which we created so we can loop through and check the JSON afterwards - as we're still trying to figure out why.
If we then only have a handful of the content items where the content hasn't updated and drop them in the folder and run with just those it does seem to update the content shows in the CMS. Unfortunately we've yet to figure out why, as it seems of the 10k items we're trying to import we have 3k where it looks like they should have got the new values but don't seem to have been updated - so I'm chasing needles in haystacks at the moment.