-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performing a sync on a configuration with Transparant Sync breaks stuff?? #426
Comments
Sync will peform what a sync always does, when triggered. It is possible to trigger a sync that skips transparent syncs, but I cannot determine from your post if this has been used or not. Likely not. Unicorn/src/Unicorn/ControlPanel/Pipelines/UnicornControlPanelRequest/SyncVerb.cs Line 55 in e9028ac
So to answer your question; without being told otherwise, running "sync" will do what one would always expect - puts the current database in the same state as found in the source of truth (files on disk). As for the other problem you are referring to; you should really try and avoid having Unicorn configs so granular, so as to templates and fields being split across too many configurations. Especially so if you have a mix of regular and transparent sync configurations in place. |
Thanks for the reply! The changes were all part of the same configuration, I fortunately don't have that many configurations :) But to come back to my original question: |
It will. You are making the assumption that because the configuration is transparent sync, a sync operation will not do anything. It absolutely will - it will do everything that a sync operation normally does. Which is why there is an option to skip transparent sync configurations - in case you do not want these configurations to influence your database. The flipside of this is; you do not need to sync these transparent sync configurations. The key word here is need. You absolutely can and, if you do, it will be like performing a sync on any other configuration. Transparent sync relies on the DataProvider being active. This would generally only be the case on your local environment, not upstream CI and QA environments. You can and must sync in your content upstream even with no DataProvider. |
Do you want to request a feature or report a bug?
Is a question OK too? ;)
I'm in the process of tracking down an issue we're having with transparent sync. For that, I need to understand what happends under the hood a little bit better. I hope you can provide me with some information :)
Ok I have a Unicorn configuration on some templates (Unicorn 4.0.4), nothing too fancy. This configuration has Transparant Sync enabled. Now someone has performed a sync on that configuration and after that we've los some content. From the sync logs I can see that:
Some template fields were deleted and added at another place. Because it deleted the fields first before adding them again, this caused all underlying data on all items that use that template to be deleted. Why it didn't do a 'move' operation is beyond me (because the id's are exactly the same), but that's not my question.
My question is: if the configuration has transparent sync enabled, a sync operation shouldn't do anything right? Sure it would update the data in database, but because transparent sync is enabled, it wouldn't do anything with that data in the database, right? Or am I missing some logic here?
Thanks in advance for any insight you might have :)
The text was updated successfully, but these errors were encountered: