Skip to content
Snippets Groups Projects

Issue #3107493: obsolete text in README

2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
16
17 [Default Content][1] allows you to export content along with site configuration information. It supports entity-references between content as well as files if you have File entity. Content export works with a set of drush commands (more on those below). Content import happens automatically as part of site installation. The import process scans all modules and imports any content found that is located in the expected file path and using the expected .json file structure. (See detailed information below)
18
19 ### Features
20
21 * Supports entity-references between content
22 12
23 * Supports files if you have File entity
13 The Default Content module allows you to export content along with
14 site configuration information. It does so by leveraging core's
15 serialization and hal modules. It supports entity-references between
16 content as well as files if you have File entity. Content export works
17 with a set of drush commands (more on those below). Content import
18 happens automatically as part of site installation. The import process
19 scans all modules and imports any content found that is located in the
20 expected file path and using the expected .json file structure. (See
  • 51 default content can put hal+json versions of the entities (created
    52 with the drush commands) inside content/{entity_type} folders.
    68 53
    69 The default_content module expects these (at this stage) to be relative to http://drupal.org as there is no point in having default content that can only be re-imported on the originating site.
    54 Once your custom module is enabled, the entities you exported will be
    55 imported to the new environment.
    70 56
    71 Note that imported.json contains a node with a term reference field that includes a reference to the term in tag.json.
    57 For example, have a look at default_content_test, which has:
    72 58
    73 The Gliph library (in 8.x core) is used to resolve the dependency graph, so in this case the term is imported first so that the reference to it is created in the node.
    59 - `modules/default_content_test/content`
    60 - `modules/default_content_test/content/node`
    61 - `modules/default_content_test/content/node/imported.json`
    62 - `modules/default_content_test/content/taxonomy_term`
    63 - `modules/default_content_test/content/taxonomy_term/tag.json`
    • Comment on lines +61 to +63
      Suggested change
      Applied
      61 - `modules/default_content_test/content/node/imported.json`
      62 - `modules/default_content_test/content/taxonomy_term`
      63 - `modules/default_content_test/content/taxonomy_term/tag.json`
      61 - `modules/default_content_test/content/node/imported.yml`
      62 - `modules/default_content_test/content/taxonomy_term`
      63 - `modules/default_content_test/content/taxonomy_term/tag.yml`

      JSON exports are deprecated, since version 2.x the recommended file format is YAML.

    • Pieter Frenssen changed this line in version 5 of the diff

      changed this line in version 5 of the diff

    • Please register or sign in to reply
  • Pieter Frenssen added 1 commit

    added 1 commit

    • 5bd880a0 - JSON exports are deprecated, since version 2.x the recommended file format is YAML.

    Compare with previous version

  • Please register or sign in to reply
    Loading