-
Notifications
You must be signed in to change notification settings - Fork 1
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
uSync imports Content with id=0 #225
Comments
It seems like if some content fails to import then nothing will get imported. I've clean up the Content folder and reexported everything then all can be imported. Still, I find it weird that one broken piece of content .config can prevent anything from importing. |
Hi, Yes very odd indeed, do you have a copy of the uSync folder that was doing this on a clean install ? i would like to take a look see if there is anything. there are lots of caching and notifications and scopes involved when importing and maybe something gets mixed up and we can do something, the content version thing does look like something that can happen if content is changed during a saved or published notification (e.g something listening for a save notifcation itself changes content and then saves causing another notification to happen). uSync (v13) will also batch notifications together and in fact they can get processed in the background. this means if you have custom notifications you have to be aware of this, there can be side effects (https://docs.jumoo.co.uk/usync/uSync/guides/background) N.B this is false by default - but the notifications do still happen in bullk (but not in the background) after a load of items have been imported . |
Hello, I managed to create a uSync subset that reproduces this (I hope). There's also a missing doctype definition, but also the error with the non-current document. I think it should still import something regardless... I'll send the uSync folder to info@jumoo.co.uk, is that fine? I feel it's better than posting it publicly (even though I don't think there's anything sensitive there). |
Hi, I've taken a look and its looks the root of the issue is caused because your uSync folder has clashing key value in it. (e.g more than one content item file with the same Key (guid) value. you can see this if you run the uSync health check. the way the error is surfacing is a little odd as we introduced a new feature in v13.1 that can merge content files together from multiple folders (roots) - but in this instance what happens is it attempts to merge together two duplicates in the same usync "folder" (e.g usync/v9/content....). when really we should throw an error. we don't do the health check duplicate check on sync because if there are lots of files it can take a while, and would slow down all uSync operations, but what we can do is throw an error if during the sync process we find a duplicate key in the folder we are looking into, so we've added that and will put it in the next release. -- duplicates like this shouldn't be possible to create on a single Umbraco install. as uSync will always clean up duplicate files on save of a file with a key., but they can occur if source code check-ins don't contain all the changes uSync makes, or if uSync config files are copied around the uSync folder manually - the only option then is to clean them up by hand, but the health check does help you spot them |
Hello, Thank you for investigating, nice to see you found the issue and a fix. I didn't know about the health check, never used it before, but good that I learned about that. Yeah, I'm sure this scenario doesn't normally happen but since there are a few people working on the same project, with uSync being shared in source control, funky stuff is bound to happen. Thanks again. |
* From v13: Fixes (#590) - missing null check * From v13: Fixes #604. don't prepend path with ~ (for no random reason!) * From v13: Fix #224 - Observe root folder value in rootfolder array if set (and root folders array is not set). (#606) * From v13: Throw for duplicates ( Jumoo/uSync.Complete.Issues#225 ) * Add serializers and handlers for webhooks. (#613) * Add serializers and handlers for webhooks. * Webhook Comments * From v13: Add serializers and handlers for webhooks. (#613) * From v13: Fix #609 Default language importing. (#614) * From v13: Use folders provided in options over config (#610) * From v13: fix #605 - check delete by serializing item one last time. (#616) * From v13: Fix - delete entries show up twice in report and actions. (#617) * From v13: #612 - couple of extra checks so we never try to create an XCData section with a null value. (#618) * Fix for #619. don't report property deletes as changes when they have… (#621) * Fix for #619. don't report property deletes as changes when they have already happened * Add fix for #620 - don't recreate items that are deleted. * v13 - > v14 null checks. * From v13: DataType merging Empty items alway win * update build script * tidy up logging. * consistant JSON options * Add Extra saves for content (not sure we need them! - might be a rc1 issue) * Add Ability to change the editor alias on import * Post RC1 - migration fixes. * chore: project things
* From v13: Fixes (#590) - missing null check * From v13: Fixes #604. don't prepend path with ~ (for no random reason!) * From v13: Fix #224 - Observe root folder value in rootfolder array if set (and root folders array is not set). (#606) * From v13: Throw for duplicates ( Jumoo/uSync.Complete.Issues#225 ) * Add serializers and handlers for webhooks. (#613) * Add serializers and handlers for webhooks. * Webhook Comments * From v13: Add serializers and handlers for webhooks. (#613) * From v13: Fix #609 Default language importing. (#614) * From v13: Use folders provided in options over config (#610) * From v13: fix #605 - check delete by serializing item one last time. (#616) * From v13: Fix - delete entries show up twice in report and actions. (#617) * From v13: #612 - couple of extra checks so we never try to create an XCData section with a null value. (#618) * Fix for #619. don't report property deletes as changes when they have… (#621) * Fix for #619. don't report property deletes as changes when they have already happened * Add fix for #620 - don't recreate items that are deleted. * v13 - > v14 null checks. * From v13: DataType merging Empty items alway win * update build script * tidy up logging. * consistant JSON options * Add Extra saves for content (not sure we need them! - might be a rc1 issue) * Add Ability to change the editor alias on import * Post RC1 - migration fixes. * chore: project things * fixes #629 have a custom Operations handler just for uSync swagger endpoint.
Describe the bug
I was trying to import some content and fell in a rabbit hole... All documents are imported with the ID=0 so they don't show up at all...
I thought maybe my DB was broken so I started from scratch and nothing imports on a new DB.
I can leave you a .config content file:
Is there anything wrong with the file?
Sometimes there was an error with "cannot save a non-current version". So maybe that's a clue.
Any ideas? The content files are not from the latest version of usync but when I saved something there was no difference...
Maybe something that happened in the latest versions of uSync?
Thanks in advance.
Version (please complete the following information):
The text was updated successfully, but these errors were encountered: