Update 7001 is in incorrect ORDER and need to be moved inside 7000 I guess:

PHP Fatal error:  Class 'RedirectController' not found in /srv/www/html/includes/common.inc on line 7963
Fatal error: Class 'RedirectController' not found in /srv/www/html/includes/common.inc on line 7963
Drush command terminated abnormally due to an unrecoverable error.                                                                                                [error]
Error: Class 'RedirectController' not found in /srv/www/html/includes/common.inc, line 7963
The external command could not be executed due to an application error.                                                                                           [error]
'all' cache was cleared.                                                                                                                                          [success]
Finished performing updates.                                                                                                                            [ok]
# drush updb
 Metatag   7038  Manually enable all content types, vocabularies and the user entity to help  resolve issues from 1.5's architecture change.
 Redirect  7000  Migrate data and variables from the Drupal 6 path_redirect module.
 Redirect  7100  Rebuild the registry and clear the entity info cache.
 Redirect  7101  Add status field.
 Redirect  7102  Disable redirects that could cause infinite loops.
 Themekey  7302  Rebuild ThemeKey's internal property registry.
Do you wish to run all pending updates? (y/n): y
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'                                                                                   [error]
Performed update: redirect_update_7000                                                                                                                            [ok]
'all' cache was cleared.                                                                                                                                          [success]
Finished performing updates.                                                                                                                                      [ok]
# drush updb
 Metatag   7038  Manually enable all content types, vocabularies and the user entity to help  resolve issues from 1.5's architecture change.
 Redirect  7000  Migrate data and variables from the Drupal 6 path_redirect module.
 Redirect  7100  Rebuild the registry and clear the entity info cache.
 Redirect  7101  Add status field.
 Redirect  7102  Disable redirects that could cause infinite loops.
 Themekey  7302  Rebuild ThemeKey's internal property registry.
Do you wish to run all pending updates? (y/n): y
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.status' in 'field list'                                                                              [error]
Performed update: redirect_update_7000                                                                                                                            [ok]
'all' cache was cleared.                                                                                                                                          [success]
Finished performing updates.                                                                                                                                      [ok]
Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.status' in 'field list': SELECT base.rid AS rid, base.hash AS hash, base.type AS type, base.uid AS uid, base.source AS source, base.source_options AS source_options, base.redirect AS redirect, base.redirect_options AS redirect_options, base.language AS language, base.status_code AS status_code, base.count AS count, base.access AS access, base.status AS status FROM {redirect} base WHERE (base.hash = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 0NvmQe44QbcvFjdQHpNiJeuo1dWFd84uQmKII7WT1YE ) in DrupalDefaultEntityController->load() (Zeile 198 von /srv/www/html/includes/entity.inc).

and now I cannot get anything upgraded in redirect module. I'm stuck in the update process.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass created an issue. See original summary.

hass’s picture

The old path_redirect table still exists and has data that is not migrated to the redirect table.

hass’s picture

Issue summary: View changes
hass’s picture

Issue summary: View changes
hass’s picture

Here is a hotfix by editing the 7000 hook and run the functions in correct order:

[redirect.install]

/**
 * Migrate data and variables from the Drupal 6 path_redirect module.
 */
function redirect_update_7000(&$sandbox) {
  // Registry need to be refreshed HERE.
  redirect_update_7100();

  // Since following code reuses module functions by fault (!!!) this 
  // will cause failures as these functions expect the columns when
  // they do not exists. Create them earlier. However this will break
  // again if module functions are used in update hooks (*no brainer*).
  redirect_update_7101();


  if (!isset($sandbox['progress']) && db_table_exists('path_redirect')) {
...
hass’s picture

Title: Broken upgrade path from beta4 / does not recover » Broken upgrade path from path_redirect to redirect / does not recover
Internet’s picture

We had the same and disabling the redirect module fixed the issue.

swhitters’s picture

I am having the same issue. The suggestion in #5 did not solve the problem, unless I did something wrong. I just edited the redirect.install file and tried updating again and got the same error.

My error is a little different:

The following updates returned messages
redirect module
Update #7102

    Failed: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list': UPDATE {redirect} SET status=:db_update_placeholder_0 WHERE (rid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5)) ; Array ( [:db_update_placeholder_0] => 0 [:db_condition_placeholder_0] => 458 [:db_condition_placeholder_1] => 766 [:db_condition_placeholder_2] => 956 [:db_condition_placeholder_3] => 1041 [:db_condition_placeholder_4] => 1046 [:db_condition_placeholder_5] => 1121 ) in redirect_update_7102() (line 336 of /srv/bindings/90d2918ba4784e99a1429cda043f9c61/code/sites/all/modules/redirect/redirect.install).

There's a similar problem here where they suggest reverting the schema number for the redirect module, but I don't have access to MySQL. Is there an easier solution?

satter9’s picture

We disabled the redirect module as well and we no longer get the error message.

jenlampton’s picture

I'm having a similar problem in upgrading from path_redirect to Redirect 7.x-1.0-rc3. All updates actually run fine for me up until 7101 and then I get

Cannot add field redirect.status: field already exists.

I think this is because I installed the module as usual which set up the current/lates schema. Then hook_update_install() runs and sets the schema_version in the database back to 6999, which updates from path_redirect, but then attempts to run all the following updates again, even when they aren't necessary.

I think this issue may also be related: #2578019: PDOException: SQLSTATE[42S22]: Column not found -- unknown column 'base.status' in 'field list'

jenlampton’s picture

Here's a patch that does the path_redirect migration using the batch system directly instead of the update system.

Chris Matthews’s picture

Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community

I'm not sure how relevant the patch in #11 is at this point in the history of 6.x path_redirect and 7.x redirect, but it does still apply cleanly to the latest 7.x-1.x-dev and may still be useful to some so changing the status to RTBC.

Checking patch redirect.install...
Hunk #1 succeeded at 121 (offset 4 lines).
Hunk #2 succeeded at 226 (offset 4 lines).
Hunk #3 succeeded at 355 (offset 4 lines).
Applied patch redirect.install cleanly.
pifagor’s picture

  • pifagor committed 9493caf on 7.x-1.x authored by jenlampton
    Issue #2560019 by jenlampton, hass, swhitters, Internet, satter9, Chris...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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