Problem/Motivation

A common need in building features is default content--nodes that are created at feature install time.

There are three main use cases for default content:

  • Sample contentthat can be used for evaluation/demonstration and then disabled.
  • Persistent content that will be updated in code (in features) in future.
  • Placeholder content that will be edited and customized on a given site.

Ideally, a default content solution will meet all three use cases; but doing so may be challenging, and we may need to settle for different approaches in different cases.

Default content is built into the Open App Standard, with sample content being the main model in mind.

Proposed resolution

Several options exist for providing default content, including (drawing on the Open App Standard documentation):

  • Manually create nodes, taxonomy, menus, etc and track their individual ids to that they can be removed later.
  • Use Feeds to import/export content from included data files (see: Ideation app).
  • Use Default Content to give nodes machine names and export them with Features
  • Use UUID Features to export content into Features for inclusion.
  • Use Node export to export content into Features for inclusion.
  • Use Migrate to import content from e.g. CSV files, as is done in Commerce Kickstart.

Remaining tasks

  • Present an analysis and conclusions about which of these (or other) approaches best fits Debut.
  • Post a patch on the debut spec.

Related issues

Comments

nedjo’s picture

Issue summary: View changes

Add link to #1473398.

lefnire’s picture

Default Content looks pretty cool, I hadn't seen that yet. The only ones I can speak to are UUID Features & Node Export.

UUID Features
I haven't had much luck with UUID Features, and it hasn't been updated for a while. I remember having the impression that node_export decidedly trumped uuid_features regarding robustness of the export (fields handled, errors accounted for, etc) -- but that node_export didn't have features integration (a recent addition) which was what necessitated uuid_features in the frist place. In any case, I found node_export superior to uuid_features for this use-case.

Node Export
One thing node_export lacks is the ability to export menu-items linked to the nodes. The menu-items still continue to link to node/5 rather than the new $nid, which is unknown on export. Other than that, node_export is good at what it does.

lefnire’s picture

Issue summary: View changes

Note different types of default content.

nedjo’s picture

Title: Candidate standard Debut solution: node_export + UUID for default content » Decide standard Debut solution for default content
Category: feature » task
nedjo’s picture

Status: Active » Reviewed & tested by the community

Migrate is the clear winner here. With it, we can provide default or sample content and, at the same time, faciliate migration and updates.

nedjo’s picture

Issue summary: View changes

Add Migrate.