Add example module, or document how to make default_content_test installable

Created on 10 July 2022, almost 2 years ago
Updated 4 May 2023, about 1 year ago

Problem/Motivation

It would be nice to offer a working example module. If you simply move default_content_test to the custom module folder and enable it, you get this feedback:

$ drush en default_content_test

In PreExistingConfigException.php line 65:
Configuration objects (field.storage.node.field_tags, taxonomy.vocabulary.tags) provided by default_content_test already exist in active configuration

If you delete the three YAML files in the /config/install folder you can install the module and the example content is created:

$ drush en default_content_test
 [success] Successfully enabled: default_content_test

Could default_content_test be tweaked into work as an example module as well, by removing the three YAML files in the /config/install folder, or are they required for testing, because tests are run against Minimal, and not Standard profile?

Alternatively a dedicated example module could be created ... or even simpler: Add the required steps to turn default_content_test into a working example under documentation. Something like this?

  1. Move default_content_test into /modules/custom
  2. Delete three YAML files in the /config/install folder
  3. Remove line hidden: TRUE from default_content_test.info.yml (Optional)
  4. Enable the module, and see that three nodes have been created under Content (/admin/content)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Documentation

Created by

πŸ‡©πŸ‡°Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024