Error when trying to migrate comments to a clean D8 site: What’s wrong with my .yml file?

I’m trying to migrate content from my current D7 site to a Drupal 8 installation.

I’ve managed to import some of the nodes, and now I want to import the comments for those nodes.

Every time I click on “run” (…/admin/structure/migrate/manage/importarComentarios/migrations/importar-comentarios/process/run) I get an error:

error

What am I doing wrong?

This is my migrate_plus.migration.importarComentarios.yml file:

id: importar-comentarios label: Comments

migration_tags: – CSV

migration_group: importarComentarios

source:   plugin: csv   path: 'public://csv/exportar-comentarios-genericos.csv'   header_row_count: 1   delimiter: ','   enclosure: '"'   keys:     - id   column_names:     0:       nid: 'nid'     1:       created: 'created'     2:       body: 'body'     3:       autor: 'autor'     4:       cid: 'cid'     5:       titulo: 'titulo'     6:       mail: 'mail'  destination:   plugin: entity:comment  process:   entity_id: nid   subject: title   'comment_body/value': body   'comment_body/format':     plugin: default_value     default_value: "html"       # Migrate our custom field   field_mail: mail       field_nombre: autor   status:     plugin: default_value     default_value: '1'       created: created   nombre: autor   email: mail   # The comment type (aka the comment's bundle).     comment_type:     plugin: default_value     default_value: 'comentario'         # The type of entity we're attaching this comment to.     entity_type:     plugin: default_value     default_value: 'node'   # The field we should attach this comment to. This is a field on your node.   field_name:     plugin: default_value     default_value: 'comentarios'  migration_dependencies: {} 

And this is the migration overview:

This is the overview This is the overview

This is the destination This is the destination

This is the process This is the process

And when clicking the source, I get:

The website encountered an unexpected error. Please try again later.

My configuration is:

My content type is called contenido My content type is called contenido

And these are the fields of my comments And these are the fields of my comments

And my contenido content type has a comentarios field for comments And my contenido content type has a comentarios field for comments

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Error when trying to migrate comments to a clean D8 site: What’s wrong with my .yml file?

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.