Skip to content

Missing bundle for entity type node #2

Description

@laura-johnson

Hi,

I'm trying to use your example to import nodes from a csv file.

I'm getting this from drush:

Missing bundle for entity type node [error]
/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:88

Do you know what I'm missing? My code is below.
Thank you!

# Migration configuration for student content.
id: student_node
label: Students 
migration_tags:
  - CSV
source:
  plugin: csv
  # Full path to the file.
  path: /Users/rcmdev/Documents/Websites/8/modules/d8_custom_migrate/students.csv
  # The number of rows at the beginning which are not data.
  header_row_count: 1
  # These are the field names from the source file representing the key
  # uniquely identifying each game - they will be stored in the migration
  # map table as columns sourceid1, sourceid2, and sourceid3.
  keys:
    - sid
  # Here we identify the columns of interest in the source file. Each numeric
  # key is the 0-based index of the column. For each column, the key below
  # (e.g., "start_date") is the field name assigned to the data on import, to
  # be used in field mappings below. The value is a user-friendly string for
  # display by the migration UI.
  column_names:
    # So, here we're saying that the first field (index 0) on each line will
    # be stored in the start_date field in the Row object during migration, and
    # that name can be used to map the value below. "Date of game" will appear
    # in the UI to describe this field.
    0:
      sid: Identifier
    1:
      first_name: First name
    2:
      last_name: Last name

destination:
  plugin: entity:node
  type:
    plugin: default_value
    default_value: student
process:
  title: first_last
  field_sid: sid
  field_first_name: first_name
  field_last_name: last_name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions