At least ViewMode presumes content_node_field_instance exists. It needs a requirements check.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Issue summary: View changes
eliza411’s picture

Status: Active » Reviewed & tested by the community

Tested with the latest pull (7cf6b33a5), and there's no longer an error.

chx’s picture

Title: Errors migrating nodes when CCK is not enabled » The view mode source misses a requirements check for CCK
Priority: Critical » Normal
Status: Reviewed & tested by the community » Active

OK then reworded for the current problem and demoting.

ultimike’s picture

I think this is still an issue, as I just ran into it. Here's what I did:

1. Started with a brand-new D6 site, only the "standard" install. CCK ("Content" module) not enabled, confirmed that "content_node_field_instance" table doesn't exist in the database.
2. Added 2 nodes to the D6 site (one "story", one "page").
3. Ran the migration using this manifest: https://drupal.org/comment/8615887#comment-8615887
4. Received the following error:

~/Sites/imp $  drush migrate-manifest mysql://imp@localhost/drupal6 manifest.yml
Migration failed with source plugin exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal6.content_node_field_instance' doesn't exist: SELECT            [error]
cnfi.display_settings AS display_settings
FROM 
{content_node_field_instance} cnfi; Array
(
)

Migration d6_cck_field_revision:page did not meet the requirements                                                                                                              [error]
Migration d6_cck_field_revision:story did not meet the requirements                                                                                                             [error]
Migration d6_field did not meet the requirements                                                                                                                                [error]
Migration d6_field_instance did not meet the requirements                                                                                                                       [error]
Migration d6_field_instance_widget_settings did not meet the requirements                                                                                                       [error]
Migration d6_cck_field_values:page did not meet the requirements                                                                                                                [error]
Migration d6_cck_field_values:story did not meet the requirements                                                                                                               [error]
~/Sites/imp $  

I then enabled CCK ("Content" module only), and re-ran the migration - both nodes imported properly, with the following output:

~/Sites/imp $  drush migrate-manifest mysql://imp@localhost/drupal6 manifest.yml
Migration d6_field_instance did not meet the requirements                                                                                                                       [error]
Migration d6_field_instance_widget_settings did not meet the requirements                                                                                                       [error]
~/Sites/imp $  

-mike

ultimike’s picture

Project: IMP » Drupal core
Version: » 8.x-dev
Component: Code » migration system
Parent issue: » #2222375: Manual Testing: Nodes
benjy’s picture

Status: Active » Needs review
FileSize
1.43 KB

Added a checkRequirements() to the ViewModeBase source class.

I also fixed up two tiny coding standard errors in the tests that use that source class while I was testing :)

benjy’s picture

FileSize
3.1 KB
3.01 KB

OK, turns out we shouldn't be using checkRequirements() anymore but source_provider. I've updated the two child classes to use source_provider and also fixed up UploadInstance which was still using checkRequirements().

Status: Needs review » Needs work

The last submitted patch, 7: 2211611-7.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review
FileSize
3.1 KB
648 bytes

arghhh

chx’s picture

Status: Needs review » Reviewed & tested by the community

Very nice bugfix bouquet.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: 2211611-9.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review
FileSize
2.34 KB

Re-rolled.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Finally the bot agrees with me :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

  • Commit f710b04 on 8.x by webchick:
    Issue #2211611 by benjy | eliza411: The view mode source misses a...

Status: Fixed » Closed (fixed)

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