Uploaded image for project: 'Content Importer'
  1. Content Importer
  2. MGNLCI-29

An import of a node whose path already exists will fail if createTasks=never

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      Note: this problem was noticed with the content-importer feature, but it appears the problem could be in Magnolia (because the feature was working in 6.2.2 but stopped in 6.2.3)

      Attempting to use the content-import feature to import a bootstrap file which should replace an existing node (they have the same path) fails with an error if the bootstrap file has no UUID. If the bootstrap file has the same UUID as the target node, then it succeeds.

      To reproduce:

      • Configure the content importer to import files from a local directory. 
      • Configure it to use `createTasks=never`
      • Validate 'always' and 'on-change'

      For example, add this to magnolia.properties:

      magnolia.content.bootstrap.dir=${magnolia.home}/../../../content-importer
      magnolia.content.bootstrap.createTasks=never

      (See https://documentation.magnolia-cms.com/display/DOCS62/Content+Importer+module)

      • Put the bootstrap file in the directory (file is attached to this ticket.)
      • Start magnolia.
      • Note the error in the logs and that the content was not bootstrapped.

       

      Can't start module content-importerjava.lang.RuntimeException: Error importing /Users/cz/Documents/a-projects/testing/6.2.3-import-test/website-spa-demo-releases/apache-tomcat/webapps/magnoliaPublic/../../../content-importer/public/config.modules.ui-admincentral.virtualUriMappings.default.xml: Same name sibling not allowed for node /modules/ui-admincentral/virtualUriMappings/default by definition *

       

      2020-09-15 12:28:54,754 INFO  gnolia.content.observer.TaskCreatorWatcherCallback: New file detected at '/Users/cz/Documents/a-projects/testing/6.2.3-import-test/website-spa-demo-releases/apache-tomcat/webapps/magnoliaPublic/../../../content-importer/public/config.modules.ui-admincentral.virtualUriMappings.default.xml', bootstrapping. 2020-09-15 12:28:54,757 ERROR info.magnolia.module.ModuleManagerImpl            : Can't start module content-importerjava.lang.RuntimeException: Error importing /Users/cz/Documents/a-projects/testing/6.2.3-import-test/website-spa-demo-releases/apache-tomcat/webapps/magnoliaPublic/../../../content-importer/public/config.modules.ui-admincentral.virtualUriMappings.default.xml: Same name sibling not allowed for node /modules/ui-admincentral/virtualUriMappings/default by definition * (declaring type mgnl:content)    at info.magnolia.importexport.DataTransporter.importXmlStream(DataTransporter.java:409) ~[magnolia-core-6.2.3.jar:?]    at info.magnolia.importexport.DataTransporter.importXmlStream(DataTransporter.java:266) ~[magnolia-core-6.2.3.jar:?]    at info.magnolia.importexport.DataTransporter.importFile(DataTransporter.java:191) ~[magnolia-core-6.2.3.jar:?]    at info.magnolia.importexport.DataTransporter.executeBootstrapImport(DataTransporter.java:218) ~[magnolia-core-6.2.3.jar:?]    at info.magnolia.content.observer.TaskCreatorWatcherCallback.process(TaskCreatorWatcherCallback.java:178) ~[magnolia-content-importer-1.0.4.jar:?]    at info.magnolia.content.observer.TaskCreatorWatcherCallback.added(TaskCreatorWatcherCallback.java:141) ~[magnolia-content-importer-1.0.4.jar:?]    at info.magnolia.content.observer.ContentImporterModule$1.visitFile(ContentImporterModule.java:124) ~[magnolia-content-importer-1.0.4.jar:?]    at info.magnolia.content.observer.ContentImporterModule$1.visitFile(ContentImporterModule.java:120) ~[magnolia-content-importer-1.0.4.jar:?]    at java.nio.file.Files.walkFileTree(Files.java:2670) ~[?:1.8.0_151]
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                czimmermann Christopher Zimmermann
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Bug DoR
                    Task DoD