Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32225

Restore version throws exception without NXTag facet

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2023.4
    • Fix Version/s: None
    • Component/s: Tagging

      Description

      Scenario:

      Define a versioning policy to create major version on blob update, minor version on metadata update.

      Define a doctype without the NXTag facet e.g. MyDocType

      Deploy.

      Create a document (version should be 1.0)

      Upload new blob (version should be 2.0)

      Restore version 1.0 over 2.0

      Expected Result:

      Get document version 3.0

      Actual Result:

      Get version 2.0+ (but this is not the issue relevant to this ticket)

      Get error in server.log (see full stack trace attached)

      [org.nuxeo.ecm.core.work.AbstractWork] Exception during work: ListenerWork(Listener taggedVersionListener [documentRestored/3a74bea6-bb8c-4990-afe0-27cf6e8f6cc5], Progress(?%, ?/0), null)
      org.nuxeo.ecm.core.api.NuxeoException: Document DocumentModelImpl(3a74bea6-bb8c-4990-afe0-27cf6e8f6cc5, path=/mydoc, title=mydoc) of type MyDocType doesn't have the NXTag facet
      

      Workaround:

      Add the NXTag facet to relevant doctype(s) (but not always suitable)

      Note: the exception is still thrown if the NXTag facet is only applied dynamically to the document (i.e. not applied to the doctype)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              msaye Mark Saye
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: