I'm trying to content port a number of schemas from one environment to another.
Tridion is throwing the following exception:
2016/05/09 11:24:24 <56> [Information] Import process '7ba9d01d96b145e899a4beeeb4655ff2' is started by 'CBLOOM\xxxx'. 2016/05/09 11:24:24 <56> [Information] Import started at 5/9/2016 11:24:24 AM. 2016/05/09 11:24:24 <56> [Information] Building list of items to import and determining required import actions. 2016/05/09 11:24:24 <56> [Information] Unzipping and initializing package for import. 2016/05/09 11:30:05 <56> [Information] Discovery of potential problems started at 5/9/2016 11:30:05 AM. 2016/05/09 11:30:05 <56> [Information] Import items into publication '000 Empty Parent' started at 5/9/2016 11:30:05 AM. 2016/05/09 11:33:12 <56> [Information] Import items into publication '010 Schemas' started at 5/9/2016 11:33:12 AM. 2016/05/09 11:34:05 <56> [Error] Tridion.ContentManager.InvalidUriException: An unexpected version is found in the URI: tcm:x-xxx-8-v0. at Tridion.ContentManager.Utilities.AssertValidLinkUri(TcmUri uri, IEnumerable`1 allowedItemTypes, Boolean failOnUriNull, Session session) at Tridion.ContentManager.IdentifiableObject.ValidateXLinks(XmlElement content, IEnumerable`1 allowedItemTypes) at Tridion.ContentManager.ContentManagement.Schema.ValidateXml() at Tridion.ContentManager.ContentManagement.RepositoryLocalObject.OnSaving(SaveEventArgs eventArgs) at Tridion.ContentManager.ContentManagement.VersionedItem.OnSaving(SaveEventArgs eventArgs) at Tridion.ContentManager.ContentManagement.Schema.OnSaving(SaveEventArgs eventArgs) at Tridion.ContentManager.IdentifiableObject.Save(SaveEventArgs eventArgs) at Tridion.ContentManager.ContentManagement.VersionedItem.Save(Boolean checkInAfterSave) at Tridion.ContentManager.ImportExport.Process.<>c__DisplayClass2.<InvokeInErrorHandler>b__1(Boolean isRetry) at Tridion.ContentManager.ImportExport.AbortErrorHandler.Invoke[T](Func`2 function, LocalizableMessage message, Boolean retryAvailable, Boolean isCritical, UserReply additionalUserReplyOptions) at Tridion.ContentManager.ImportExport.Process.InvokeInErrorHandler[T](Func`2 function, LocalizableMessage message, Boolean retryAvailable, Boolean isCritical) at Tridion.ContentManager.ImportExport.ImportAction.SaveItem(IdentifiableObject item, IdentifiableObjectData deltaObject) at Tridion.ContentManager.ImportExport.UpdateImportAction.Perform(IdentifiableObjectData itemData) at Tridion.ContentManager.ImportExport.Importer.ImportItem(WebDavUrl exportUrl, IList`1 dependentItemsChain, Dictionary`2 unresolvedDependencies, Boolean specialImport) at Tridion.ContentManager.ImportExport.Importer.ImportItems(IList`1 items, Boolean specialGroupImport) at Tridion.ContentManager.ImportExport.Importer.Import(String packageName) 2016/05/09 11:34:05 <56> [Information] Transactional import failed at 5/9/2016 11:34:05 AM. No changes were committed to Tridion Content Manager. 2016/05/09 11:34:05 <56> [Information] Import process '7ba9d01d96b145e899a4beeeb4655ff2' is finished.
On opening via WebDAV and comparing the source and target schema, the only difference I see is:
- the ExtensionXml node in the Source environment has no tcm: namespace prefixed or defined - whilst in the target system we can see it does such that it's formatted:
Other things I've checked/confirmed are:
- it's not in an active workflow process
- it's never been in a workflow process (it's a schema)
- it's not checked-out
- it has no component link fields
- it has no embedded link fields
- it's not linked to any categories
- components based on this schema can be created
- components based on this schema can be edited and saved
We've realised that when we make any change to a schema the tcm: namespace is being removed. This, of itself, doesn't appear to be an issue as such as the content still validates against it (or the few I've tested indicate this) - this could be due to a recent hotfix we had applied due to some GUI issues with the schemas when flitting between fields (again we have to undo the hotfix and re-test to validate this so there's a few hoops to jump through).
As such, we've stopped moving schema around and I'll run some more specific tests with a single schema / content component to validate the exact scenario.
We've retrieved a database backup and can see that there is a version 0 (revision 0) of the schema at that point in time (in addition to the pre-existing major version(s)) - this would just indicate that it was checked out (it has a specific username against the owner column) so still doesn't explain why we would get unexpected version reports
After taking a schema with
- an embedded schema (schema EMB)
- a linked schema (schema LNK)
- several types of fields
- checked out the Emb and LNK schema (adding a field - but only in the checked-out status)
- checked out the core schema
- put a component based on core schema into workflow
- updated the component to a minor version
- Content published as minor version to STAGE *
- Content published last major version to LIVE *
both as expected based on approval statuses of targets