I just attempted a d6 -> d7 upgrade on alpha using drush 3.3.

The only error that came up was that hook_schema is trying to use the field_read_field method.
It may be the code path in drush is slightly different, but i dont believe it hurts anything to include this one line patch.
(just include_once'ing the file to make sure the api function is there).

Comments

anarcat’s picture

Priority: Normal » Major

Short of marking this critical (because I think it doesn't affect the web-based upgrades), I think this should be fixed for the release, as it breaks drush-based upgrades, hence marking major.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

indeed.

yched’s picture

field.crud.inc is loaded whenever field.module file is loaded (see the top of field.module).
field_sql_storage_schema() running without field.module being loaded sounds surprising, since field_sql_storage has an explicit dependency on field.

I'd rather have this investigated as a smoke sign that something more serious is wrong in drush upgrades, rather than adding one-off hardcoded includes here and there. At the very least, this needs a comment.

yched’s picture

I have no problem with this being committed as a hotfix so as not to hold a beta|RC and / or allow the use of drush to test the D6 upgrade path - if we add a comment note and keep the issue open for clean resolution before a 7.0 official release.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

That sounds like a needs work.

yched’s picture

Status: Needs work » Needs review
StatusFileSize
new775 bytes
new1 KB

Here's the hotfix patch with a comment.

However, the problem might be that system_update_7020() enables field_sql_storage.module before field.module :

 function system_update_7020() {
  $module_list = array('field_sql_storage', 'field');
  module_enable($module_list, FALSE);
}

+ WTF : field.module and field_sql_storage.module both have a dependency on each other. I guess someone's mind (possibly mine) was not entirely decided...

AFAICS, field.module should not have to depend on the pluggable field_sql_storage.module. Let's see what breaks.

Status: Needs review » Needs work

The last submitted patch, 893880-field_dependency.patch, failed testing.

clemens.tolboom’s picture

Status: Needs work » Needs review

#6: 893880-field_dependency.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 893880-field_dependency.patch, failed testing.

sun.core’s picture

Status: Needs work » Closed (won't fix)
+++ modules/field/modules/field_sql_storage/field_sql_storage.install
@@ -34,6 +34,13 @@ function field_sql_storage_schema() {
+    // field_sql_storage_schema() has been reported to run without field.module
+    // being loaded during D6 upgrades ran through drush. As a hotfix, the CRUD
+    // API file is explicitly included here. See http://drupal.org/node/893880.
+    // @todo Investigate and possibly fix drush update-db before a D7 release.

If it's a bug in drush, then drush should be fixed instead.

Powered by Dreditor.

skwashd’s picture

subscribing

deverman’s picture

Component: update system » ajax system

I got this error when trying to upgrade a drupal 6 database to drupal 7 under drush 3.3 has this been fixed in later versions of drush?

clemens.tolboom’s picture

Component: ajax system » update.module

Why are you changing the component? This has nothing to do with ajax right?
I put it back to update.module as for some reasons 'update system' is not available. (Is this a d.o bug?)

Please retry with drush 7.x-4.4 and elaborate more on the error and your site setup. I guess you have a locale or multi-language site.

clemens.tolboom’s picture

Status: Closed (won't fix) » Needs review

#6: 893880-field_dependency.patch queued for re-testing.

clemens.tolboom’s picture

The second patch from #6 (yched WTF) never made it.

See #896698: Circular dependency references between field and field_sql_storage which could be marked dup if this makes it.

Status: Needs review » Needs work

The last submitted patch, 893880-field_dependency.patch, failed testing.

bfroehle’s picture

Status: Needs work » Closed (won't fix)

Let's keep this issue closed and use the linked issue for discussing the circular dependency.