4

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: <tcm:ExtensionXml xmlns:tcm="http://www.tridion.com/ContentManager/5.0">

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

UPDATE

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.

UPDATE 2

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

UPDATE 3

After taking a schema with

  • an embedded schema (schema EMB)
  • a linked schema (schema LNK)
  • several types of fields

I then

  • 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

Results:

No issues:

  • Content published as minor version to STAGE *
  • Content published last major version to LIVE *

both as expected based on approval statuses of targets

  • Have you tried updating the namespace and porting again? – Robert Jin May 9 '16 at 23:27
  • Hi Robert - adding the TCM is just removed on saving (or hitting validate) - I'm not sure the namespace is too relevant given it's defined within each element and doesn't impact the content (form the quick tests I've seen) – Dylan .. Mark Saunders May 10 '16 at 15:47
  • The error says that in the schema itself there is a link to another (embedded) schema and that link has -v0 in it, which is not allowed (TCM does not allow to link one item to a specific version of another item). Try to open schema xsd from the package (the one that is being imported, not the one that is reported in the error with v0) and check if version suffix is present there. – AntonM May 13 '16 at 6:19
  • Hi Anton - I've tested and updated as update 3 - seems this doesn't cause an issue in the simple case but I wonder if we start to add/update content based on it then we start to see issues - seems like one we'll find very very tricky to reproduce now it's stopped happening - safe to say we will recommend aligning versions on schema with related schema (or at least workflow status) wherever possible – Dylan .. Mark Saunders May 19 '16 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.