Firstly, thanks to Kevin Jump/everyone working on uSync for a very useful package.
We're encountering an issue with Node deletions being captured by uSync and are wondering if anyone can offer advice, please?
We have the following setup:
Umbraco 7.15.4
uSync.BackOffice 4.0.5.0
uSync.Core 6.0.7.0
uSync.Content: 4.1.3.0
Looking at the uSync documentation, it states "When you delete an item, an entry is made into the uSyncActions.config file that tracks deletes. This file is used during an import, to process the delete on other Umbraco instances.”
Our Issue
However, whenever we delete nodes in the backoffice, no entries appear in the "uSync/data/uSyncActions.config" file.
I have checked the settings in our "uSyncBackOffice.config" file against the documentation which states this is controlled by the "Export on Save/Delete" entry in the config:
<ExportOnSave>true</ExportOnSave>
Unfortunately, I cannot see any additions to "uSync/data/uSyncActions.config" (or any other file generated at all) upon Node deletions.
A search did find the following issue on GitHub: [Deleting content should (optionally) add actions to the action file][1], however I don't think this applies as it was fixed in the "v4.04 patch release"?
I think this may be a missing setting/configuration issue but can't see what this could be.
If anyone has experience/opinions on this issue I would appreciate your thoughts.
The uSyncActions.config file, I think, is only for tracking deletes of structure eg 'Document Types' and 'Data Types' in the core uSync version, rather than being used in the Content Edition to track deletes to content.
With uSyncContentEdition, when you delete a node, it should still have a corresponding text file on disk matching where it was in the content structure in the uSync Content folder - but this file will not have the original content - then when you move the blank file to the target environment, that's how uSync knows it should delete the particular content item there during import.
This created a folder and file: "/uSync/Data/site name/deletionTest/content.config"
Deleted the Node "deletionTest"
This deleted the file: "/uSync/Data/site name/deletionTest/content.config"
However, the Folder "/uSync/Data/site name/deletionTest/" remains
Searching my filesystem, I don't see a corresponding text file on disk - from what we're discussing I am expecting to see a text file (without original content) at "/uSync/Data/site name/deletionTest/content.config".
I wonder if you could offer any advice as to whether this could be related to a configuration setting in the "uSyncBackOffice.Config" file?
I have seen forum posts mentioning having to "turn on the tracking of deletes in the usync backoffice configuration file as well", but can't see any config element that handles this in the file, or mentioned in the documentation?
Again, thank you very much for taking the time to help.
What happens if you create a new node, push the usync files to a new environment and do an import (to create the new node in the new environment)
Then go back to the original environment, and delete the node
and push the usync files to the new environment (eg with just the folder, and no file in it) does running the import delete the node on the new environment?
eg is it the existence of the folder with no file that is the trigger for deletions?
(sorry it is a while since I played with the content edition)
Delete Node "Test" (which exists on my Local and on the DEV environments, in the back office)
On Local: a file was generated at "uSync/data/content/site name/test/content.config"
This was marked by Visual Code source control as "deleted" (red "D" next to the file)
Made a Pull Request for the uSync/data/content/site name/test/content.config*
Deployed this to DEV server
Logged into DEV back office, which, under the "Developer" section "uSync" has "Auto Sync" enabled
Checked "Content" tree - unfortunately the node has not been deleted
I'm stumped at this point. I have checked the docs, config settings, performed multiple tests and uSync simply does not seem to generate any "empty .config" file.
I'm wondering, does anyone know if it is possible to contact the lead dev, Kevin Jump, directly?
If anyone can offer any thoughts, I would appreciate it.
"When you delete anything while you have uSync installed it will write an 'empty' .config file in the place where the config file for the item you are deleting use to be, these 'empty' files tell uSync what items need deleting when an import is run."
I will test your suggestion and see if this works. Your help is much appreciated, thanks.
with these settings on the deletes will go into the uSyncActions.config file..
For the blank file behaviour and v4 you need to have PreserveAllFiles set to true in the uSyncBackOffice.Config file
<PreserveAllFiles>false</PreserveAllFiles>
for uSync 4 - this will write a 'blank' file in place of any file you delete - As not all deployment methods delete files from the target site - this stops old files from causing content or items to be accedently recreated when a sync occurs.
in v8 - this has changed - there is no longer a usyncactions.config file, and the 'blank' files now contain the command (e.g delete or rename) that uSync should do, so in many ways its much simpler and a bit more robust - as we don't have to worry about all of these files just the 'empty' ones.
uSyncActions.config file not capturing Node deletion(s)
Hello.
Firstly, thanks to Kevin Jump/everyone working on uSync for a very useful package.
We're encountering an issue with Node deletions being captured by uSync and are wondering if anyone can offer advice, please?
We have the following setup:
Looking at the uSync documentation, it states "When you delete an item, an entry is made into the uSyncActions.config file that tracks deletes. This file is used during an import, to process the delete on other Umbraco instances.”
Our Issue
However, whenever we delete nodes in the backoffice, no entries appear in the "uSync/data/uSyncActions.config" file.
I have checked the settings in our "uSyncBackOffice.config" file against the documentation which states this is controlled by the "Export on Save/Delete" entry in the config:
Unfortunately, I cannot see any additions to "uSync/data/uSyncActions.config" (or any other file generated at all) upon Node deletions.
A search did find the following issue on GitHub: [Deleting content should (optionally) add actions to the action file][1], however I don't think this applies as it was fixed in the "v4.04 patch release"?
I think this may be a missing setting/configuration issue but can't see what this could be.
If anyone has experience/opinions on this issue I would appreciate your thoughts.
Thanks in advance.
Hi Frank
The uSyncActions.config file, I think, is only for tracking deletes of structure eg 'Document Types' and 'Data Types' in the core uSync version, rather than being used in the Content Edition to track deletes to content.
With uSyncContentEdition, when you delete a node, it should still have a corresponding text file on disk matching where it was in the content structure in the uSync Content folder - but this file will not have the original content - then when you move the blank file to the target environment, that's how uSync knows it should delete the particular content item there during import.
regards
marc
Hello Marc and thank you for the quick reply.
I have applied this as quick test this morning:
In the Umbraco Back Office
This created a folder and file: "/uSync/Data/site name/deletionTest/content.config"
Deleted the Node "deletionTest"
Searching my filesystem, I don't see a corresponding text file on disk - from what we're discussing I am expecting to see a text file (without original content) at "/uSync/Data/site name/deletionTest/content.config".
I wonder if you could offer any advice as to whether this could be related to a configuration setting in the "uSyncBackOffice.Config" file?
I have seen forum posts mentioning having to "turn on the tracking of deletes in the usync backoffice configuration file as well", but can't see any config element that handles this in the file, or mentioned in the documentation?
Again, thank you very much for taking the time to help.
Hi Frank
Hmm, maybe it is the empty folder that is enough?
What happens if you create a new node, push the usync files to a new environment and do an import (to create the new node in the new environment)
Then go back to the original environment, and delete the node and push the usync files to the new environment (eg with just the folder, and no file in it) does running the import delete the node on the new environment?
eg is it the existence of the folder with no file that is the trigger for deletions?
(sorry it is a while since I played with the content edition)
regards
Marc
Hello again.
I have just completed the following test
I'm stumped at this point. I have checked the docs, config settings, performed multiple tests and uSync simply does not seem to generate any "empty .config" file.
I'm wondering, does anyone know if it is possible to contact the lead dev, Kevin Jump, directly?
If anyone can offer any thoughts, I would appreciate it.
Hello Marc.
That's a good point, which also occurred to me after noticing the folder was left behind on a deletion.
However I'm slightly confused as I read a comment by Kevin Jump in Some content gets deleted when running full import in which he states:
"When you delete anything while you have uSync installed it will write an 'empty' .config file in the place where the config file for the item you are deleting use to be, these 'empty' files tell uSync what items need deleting when an import is run."
I will test your suggestion and see if this works. Your help is much appreciated, thanks.
Hope you have a great day.
Hi,
yeah - sorry the documentation isn't super clear for this version.
for Content and Media on v4 of uSync - deletes will not be marked unless the handlers settings to turn on deletes has been set:
that is
and for media
with these settings on the deletes will go into the uSyncActions.config file..
For the blank file behaviour and v4 you need to have
PreserveAllFiles
set to true in the uSyncBackOffice.Config filefor uSync 4 - this will write a 'blank' file in place of any file you delete - As not all deployment methods delete files from the target site - this stops old files from causing content or items to be accedently recreated when a sync occurs.
in v8 - this has changed - there is no longer a usyncactions.config file, and the 'blank' files now contain the command (e.g delete or rename) that uSync should do, so in many ways its much simpler and a bit more robust - as we don't have to worry about all of these files just the 'empty' ones.
I thought I had replied to this response at the time, just noticed this was missed.
The approach that worked for us
In the Development site Back Office, delete an existing NODE - this will add an entry to the "/uSync/data/uSyncActions.config" file
Source control these files and deploy to the target site
Many thanks to everyone who took the time to respond, particularly Kevin Jump. Your help is appreciated.
Hi Frank,
Is it possible to see your entire uSyncBackOffice.config file?
I tried adding the handler config but something must be wrong since it keeps deleting everything on IIS restart.
Currently, what I have:
I've tried adding it in like this
as well as removing on each of them but they all wipe on restart. Not sure if i'm typing in the configurations correctly.
Thank you
Nvm hehe copying config directly from documentation worked for me
https://usync.readthedocs.io/handler-config/
Hello Phung, apologies for the late response - busy week here and I missed this.
The only changes made were outlined in my previous post, otherwise these files are the same as the "default".
Glad you got this working!
Best regards.
is working on a reply...