A site builder can choose when to install and remove default and sample content (import or role back migrations)
User story
Given that I am logged in as site administrator,
when I no longer want sample content, or after installing a module i decide i want sample content
I want to be able to migrate content in or out so that i have examples that i can manually overwrite or automatically remove, at my choice.
See also #293
Background
Originally Drutopia used the Default Content module, in combination with Better Normalizers. This basically worked but has a series of issues due to lack of support for default content being provided after an initial site install; see the following long-stalled issues Add option to exclude local ID and revision ID values and Do not import entity IDs (included in exports from Drupal 8.1.x).
As discussed in #289:
Specific limitations include:
- In our current approach, default content requires manual edits after export.
- It's hard to change previously generated default content, since regenerating means having to repeat the onerous manual edits.
- A focused distribution can't easily alter or replace default content that ships with a feature.
- Despite the similarity to migration use cases, our default content approach doesn't help when it comes to migrating into Drutopia.
- We can anticipate the need to regenerate all default content due to changes in fields (media fields rather than image fields, whether we continue to use paragraphs for body fields, and so on).
We have since switched to Yaml Content module, requiring only minor edits to the existing exported yaml. I think most of the downsides still apply, and none of the modules have had commits since 2020.
Proposed solution
Use Migrate. There is no existing solution, but this puts us relying on core and code we'll want to use for lots more, such as supporting Drutopia to Drutopia content migration.
Note Core itself uses a custom solution for the Umami Demo profile: