I'm on drupal 8.1.5:

➜  public_html drush pml
 Package              Name                                              Type    Status         Version       
...
 Core (Experimental)  Migrate (migrate)                                 Module  Enabled        8.1.5         
 Core (Experimental)  Migrate Drupal (migrate_drupal)                   Module  Enabled        8.1.5         
 Core (Experimental)  Migrate Drupal UI (migrate_drupal_ui)             Module  Enabled        8.1.5         
...       
 Migrate              Migrate API (migrate_api)                         Module  Enabled        8.x-1.1       
 Migrate              Migrate UI (migrate_ui)                           Module  Enabled        8.x-1.1       
 Migrate              Migrate UI Templates (migrate_ui_templates)       Module  Not installed  8.x-1.1       
 Migration            Drupal Upgrade (migrate_upgrade)                  Module  Enabled        8.x-2.0-beta1 
 Migration            Migrate Example (migrate_example)                 Module  Not installed  8.x-2.0-beta1 
 Migration            Migrate Example (Advanced)                        Module  Not installed  8.x-2.0-beta1 
                      (migrate_example_advanced)                                                             
 Migration            Migrate Plus (migrate_plus)                       Module  Enabled        8.x-2.0-beta1 
 Migration            Migrate Tools (migrate_tools)                     Module  Enabled        8.x-2.0-beta1 
...

Running a basic migrate upgrade from an old d6 database:

➜  public_html drush migrate-upgrade 
...
Attempt to create a field comment_no_subject that does not exist on entity type node.             [error]
(/home/naught101.org/public_html/core/modules/field/src/Entity/FieldConfig.php:286)
...

All of the comments on my site are subjectless comments on blog posts, like this: http://naught101.org/node/131#comments. The comments *do* get migrated, I can see them in admin/content/comment, but they don't show up on the actual blog posts, and I get a notice:

Notice: Undefined index: comment_no_subject in Drupal\comment\Controller\CommentController->commentPermalink() (line 123 of core/modules/comment/src/Controller/CommentController.php).

See e.g. http://163.172.137.64/~naught101.org/node/131 for the migrated version.

When I click on one of the comments from admin/content/comment, I get a WSOD, and the error in the logs is:

[Sat Jul 09 03:33:38.710902 2016] [:error] [pid 16704] [client 101.176.248.106:44224] PHP Fatal error:  Call to a member function getSetting() on null in /home/naught101.org/public_html/core/modules/comment/src/Controller/CommentController.php on line 126, referer: http://163.172.137.64/~naught101.org/admin/content/comment

I haven't found any other comments mentioning this issue. Any support would be welcome, let me know if I can provide any more info.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naught101 created an issue. See original summary.

mikeryan’s picture

Project: Migrate Upgrade » Drupal core
Version: 8.x-2.x-dev » 8.1.x-dev
Component: Code » migration system
Assigned: naught101 » Unassigned
Priority: Major » Normal

This would be a problem in the migration system, not in the drush front end.

The key message here would be

Attempt to create a field comment_no_subject that does not exist on entity type node. (/home/naught101.org/public_html/core/modules/field/src/Entity/FieldConfig.php:286)

Are there any messages in the migrate_message tables for d6_comment_field or d6_comment_field_instance?

naught101’s picture

Version: 8.1.x-dev » 9.x-dev
Component: migration system » ajax system
Assigned: Unassigned » naught101
Priority: Normal » Major

Yeah, sorry about that - getting confused about all of the migrate* modules..

In d6_comment_field_instance, there is this:

msgid: 1		
source_ids_hash: 5fe6833818eedfc3fd8b6b7c36015756cb82b9a2476558579584db40cbd7ef92 	
level: 1 	
message: Attempt to create a field comment_no_subject that does not exist on entity type node. (/home/naught101.org/public_html/core/modules/field/src/Entity/FieldConfig.php:286)

No data in any of the other migrate_message_* tables...

I just tried this again with a fresh site install, same result.

naught101’s picture

Version: 9.x-dev » 8.1.x-dev
Component: ajax system » migration system
Assigned: naught101 » Unassigned
Priority: Major » Normal

Argh, WTF... I didn't touch any of those metadata fields...

naught101’s picture

Migration doesn't actually add any comment fields to the new content types (blog post and page).

I'm trying to create the field manually, but I'm not sure if there is a way to do it without tonnes of manual coding, since drush field-create/clone doesn't work in drupal 8. and I'm not even sure that that would work anyway..

naught101’s picture

naught101’s picture

Status: Active » Needs review
FileSize
852 bytes

Yep. This works. The comment fields now migrate correctly, however, the display is disabled by default. Easy enough to enable manually though.

Status: Needs review » Needs work

The last submitted patch, 7: Issue_2763283-upgrade_migrate_comments_01.patch, failed testing.

The last submitted patch, 7: Issue_2763283-upgrade_migrate_comments_01.patch, failed testing.

The last submitted patch, 7: Issue_2763283-upgrade_migrate_comments_01.patch, failed testing.

The last submitted patch, 7: Issue_2763283-upgrade_migrate_comments_01.patch, failed testing.

The last submitted patch, 7: Issue_2763283-upgrade_migrate_comments_01.patch, failed testing.

thomas73’s picture

chx’s picture

Status: Needs work » Reviewed & tested by the community

Yes, that test made no sense. Look at it: page is the first row, and it is on comment_subject_field_page is serialize(1) . And yet we tested that it became comment_no_subject which is wrong.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 24343f9 to 8.3.x and 146dabc to 8.2.x and 94becf0 to 8.1.x. Thanks!

Nice that we were testing the broken behaviour :)

  • alexpott committed 24343f9 on 8.3.x
    Issue #2763283 by naught101, thomas73: Failure on comments with no...

  • alexpott committed 146dabc on 8.2.x
    Issue #2763283 by naught101, thomas73: Failure on comments with no...
chx’s picture

I called out rote and pointless testing in https://medium.com/@chx/the-terrible-cycle-of-contributing-to-drupal-cor... 3. Most of the source plugin unit tests could be nuked safely because they are pointless and only exist because everything must be tested.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.