The fairly simple Drupal 6.16 site described in #785184: Attempts to update a D6.16 site to D7 will update to D7 HEAD (providing the patch in #22 of that issue is applied before attempting the update!). But opening the new D7 site produces the error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'stuart_d6.drupal6_block_node_type' doesn't exist: SELECT module, delta, type FROM {block_node_type}; Array ( ) in node_block_list_alter() (line 2287 of C:\WebStuff\www\drupal7\modules\node\node.module).

This table does not exist in the D6.16 database, but it is not created by the update process.

CommentFileSizeAuthor
#9 7006-update.diff1.19 KBmarcingy
#7 7006-update.diff692 bytesmarcingy
#6 7006-update.diff654 bytesmarcingy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

StuartJNCC’s picture

Issue tags: +D7 upgrade path

Tagging for D7 Upgrade path

StuartJNCC’s picture

It seems that this should have been fixed in #684774: Block visibility settings cannot be properly extended. The patch in #34 includes function block_update_7001() which creates the block_node_type table. According to #38, this patch was committed to HEAD by Dries on 28/03/2010. But I just updated my version of HEAD and checked modules/block/block.install and this function is not there (updates 7000, 7002, 7003 and 7004 are however present). So what has happened to update 7001? I searched for this function and can find no other mention of it outside that issue.

marcingy’s picture

The code now lives in node_update_7010 after being moved there by http://drupal.org/node/684774#comment-2703744.

marcingy’s picture

Title: Following D6 -> D7 update, opening the new site fails because table block_node_type does not exist » Update fails on node update 7006.

I believe the cause of this is because node update 7006 fails and hence the node 7010 is never run - we get the following errr Attempt to create an instance of field body without a bundle.

Site was set up by running devel to create randon story and page nodes.

marcingy’s picture

Title: Update fails on node update 7006. » Update fails on node_update_7006.
marcingy’s picture

Status: Active » Needs review
FileSize
654 bytes

node_add_body_field expects an object not a string. This patch converts it and once applied remainder of upgrade completes and error reported by
StuartJNCC no longer occurs.

marcingy’s picture

FileSize
692 bytes

Above will fail to apply - grr windows...

catch’s picture

Component: update system » node system
Status: Needs review » Needs work

Ouch. The phpdoc for node_add_body_field() is wrong too though.

marcingy’s picture

Status: Needs work » Needs review
FileSize
1.19 KB

Reroll with updated phpdoc.

catch’s picture

Status: Needs review » Reviewed & tested by the community
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome! I love munching RTBC critical issues. Especially when they're about the upgrade path. :D

Committed to HEAD!

Status: Fixed » Closed (fixed)
Issue tags: -D7 upgrade path

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