I am looking for a standardized way to add content such as content types into an installation profile.
Suppose we exported the JSON for REST Content and want to import them during installation. I have created a custom profile, and it works. Now I need to import the default content. For that, I used the Default Content for D8 module.
So, I created the content folder in profile/custom_module/content/node/my_file.json.
Also, I am using a minimal profile installation with the following hook_install()
implementation.
function mymodule_profile_install() {
include_once DRUPAL_ROOT . '/core/profiles/minimal/minimal.install';
minimal_install();
}
In the info.yml file, there is only one module dependency.
dependencies:
- default_content
When I run install.php, my default content is not installed. Also, when I checked admin/module page, this module is enabled, but the basic core modules aren't, even if they are listed in the minimal.info.yml file.
I don't understand what I am missing.
Why isn't my default content installed?