usync publish to server only sends a shell of the node
When using the the "publish to..." or "publish to server..." options in uSync with Umbraco 9 (both uSync and Umbraco updated to latest version) I can't get the anything but the "shell" of the node to show up on the receiving end.
So if I send the following:
I end up receiving this:
So none of the values of the properties actually get sent. There is no errors in Umbraco's logs.
Yeah with debugging on I would expect that when you perform a sync from the standard uSync dashboard. In the background uSync publisher has disabled all of those handlers for a normal sync (so publishedContentHandler is the one publisher uses but not a normal uSync. the others are to handle file transferes).
However when you push content from the content tree - you should see something like this. on your 'source' server
Aaaahhh, I found the issue now - TL;DR: It's my fault! :D
I have made a handler that blocks anyone without an admin role from changing certain things (because you cannot set permissions for specific properties on a node, which is disappointing) but uSync doesn't have an admin role when trying to transfer content, so it fails.
Disabling this handler makes it work flawlessly :)
Is there any way to give uSync a role or indentify the uSync process so I can keep my handler while not breaking uSync?
when uSync publisher is running the remove commands the process running creates a Claim Identity with the name "hmacauth" with a "Remote" claim,
so maybe you could check to see if that claim exists on the process (not sure if this makes sense or would work?)
more generically whenever uSync is doing something it actually pauses some of the other uSync elements using the uSyncEventService.
you could inject this service and then check for IsPaused. which would tell you if uSync is doing anything at the time, and therefor likely the thing that is updating the content.
e.g
if (_uSyncEventService.IsPaused) {
// triggered by an usync update
}
usync publish to server only sends a shell of the node
When using the the "publish to..." or "publish to server..." options in uSync with Umbraco 9 (both uSync and Umbraco updated to latest version) I can't get the anything but the "shell" of the node to show up on the receiving end.
So if I send the following:
I end up receiving this:
So none of the values of the properties actually get sent. There is no errors in Umbraco's logs.
Any ideas what's going wrong?
Hi,
no idea (yet) why its doing that, but it looks like it is only running the first half of the sync process.
Syncing content is done in two stages, the nodes are created in the first one and the properties updated in the second step.
if you add debug logging for uSync it might give you a bit more information and maybe a hint of where it is going wrong.
in app settings, add a "uSync": "Debug" value to the Serilog settings so it looks something like this
After adding debug logging I get this:
Though I don't know why they're disabled - I haven't disabled any handlers AFAIK.
Hi
Yeah with debugging on I would expect that when you perform a sync from the standard uSync dashboard. In the background uSync publisher has disabled all of those handlers for a normal sync (so publishedContentHandler is the one publisher uses but not a normal uSync. the others are to handle file transferes).
However when you push content from the content tree - you should see something like this. on your 'source' server
and something like this on the target:
Aaaahhh, I found the issue now - TL;DR: It's my fault! :D
I have made a handler that blocks anyone without an admin role from changing certain things (because you cannot set permissions for specific properties on a node, which is disappointing) but uSync doesn't have an admin role when trying to transfer content, so it fails.
Disabling this handler makes it work flawlessly :) Is there any way to give uSync a role or indentify the uSync process so I can keep my handler while not breaking uSync?
Hi,
Maybe it might depend a bit on your handler,
when uSync publisher is running the remove commands the process running creates a Claim Identity with the name "hmacauth" with a "Remote" claim,
so maybe you could check to see if that claim exists on the process (not sure if this makes sense or would work?)
more generically whenever uSync is doing something it actually pauses some of the other uSync elements using the
uSyncEventService
.you could inject this service and then check for IsPaused. which would tell you if uSync is doing anything at the time, and therefor likely the thing that is updating the content.
e.g
not sure but these might help?
Using uSyncEventService.IsPaused works perfectly :)
Thanks so much for your help Kevin!
is working on a reply...