Bootstrapping/importing content with CT defined workspaces
Description
is causing
Activity

Jaroslav Simak June 29, 2020 at 5:04 PM
Also happened with XML files. And yes, i came to the same conclusion when debugging, it's the DataTransporter issue.

Robert Šiška June 29, 2020 at 12:27 PMEdited
So all changes are only relevant to the {{magnolia.content.bootstrap.dir }}directory (content importer), but not to the 'magnolia.bootstrap.dir' (usually 'WEB-INF/bootstrap/common')?
Yes.
So when magnolia.content.bootstrap.initial=true is used - then on install, no Tasks are created, no human intervention required? (unless path already exists?)
Also yes.
When 'magnolia.content.bootstrap.initial=true' is used - does this happen at every startup? Or only at install as the 'WEB-INF/bootraps/common' > feautre does?When 'magnolia.content.bootstrap.initial=true' is used - does this happen at every startup? Or only at install as the 'WEB-INF/bootraps/common' > feautre does?
Yes, at every start-up.
(If at every startup, I think this will cause problems with all of the files that anyone adds to the importer running at every startup and generating tasks everytime.)
Yes, that's a problem but I'd say it's only a symptom of another problem that tasks are created even when there are no actual changes (see )
changing same import file leads into same name siblings when task is approved
That happens only with yaml files, right? There's an issue with DataTransporter ignoring Import Behaviour when importing yaml files...

Jaroslav Simak June 25, 2020 at 11:53 AM
Closing this ticket because module has been released even without proper final QA.

Christopher Zimmermann June 22, 2020 at 7:42 AMEdited
- When 'magnolia.content.bootstrap.initial=true' is used - does this happen at every startup? Or only at install as the 'WEB-INF/bootraps/common' feautre does?
(If at every startup, I think this will cause problems with all of the files that anyone adds to the importer running at every startup and generating tasks everytime.)

Christopher Zimmermann June 16, 2020 at 6:43 AM
So when magnolia.content.boostrap.initial=true is used - then on install, no Tasks are created, no human intervention required? (unless path already exists?)
Problem:
If you use the Content Types feature to define workspaces and node types, and you have JCR content bootstrap files that rely on those Content Type definitions (typically in a modules 'mgnl-bootstrap' directory, or in the WEB-INF/bootraps/common directory), then the content will not be correctly installed at install time. When the system tries to bootstrap the content, it has not yet processed the Content Types and so the workspace does not exist yet.
Implemented in this ticket:
To bootstrap content, when using Content Types, use the Content Importer feature. Do not use the " WEB-INF/bootraps/common" feature.
The following capabilities have been added to the Content Importer feature.
In addition to
magnolia.content.bootstrap.dir
property, this ticket introducesmagnolia.content.bootstrap.pattern
which specifies wildcard pattern (glob). When not used, the behavior of content-importer is identical (the pattern defaults to *. {yaml,xml})Property
magnolia.content.bootstrap.initial=true
(false by default) makes all files matching the pattern bootstrap at the startup. If the content with same path already exists, the import task is created instead.Note - if you use the
bootstrap.initial
property, then you will recieve additional import tasks at every system restart. You can workaround this by setting the property to false after the initial import. Or by removing the bootstrap files from the configured directory once they are imported.This behaviour is addressed in https://magnolia-cms.atlassian.net/browse/MGNLCI-25
Copied from a documentation comment from