Upgrading old Drupal, Part 2: Show module names which causes Drupal update failed, and resolve it.

I was upgrading an old drupal 6 site to drupal 7.
Lots of modules and themes need to be upgraded at the same time. Some are easy, but some not when it comes to dependency issues.
I keep getting Some of the pending updates cannot be applied because their dependencies were not met. error when running Database update. OK I know there's some problems with module, but which module(s)?

This is a follow-up of Upgrading old Drupal, Part 1: No content shown, unable to login, missing modules, and resolve it.

1. Modify update.php, a dirty hack and quick workaround

Go to /usr/share/drupal7, make a backup of update.php.
Start editing update.php

Firstly we need to add a variable to store module names. At line 62 we add a $bad_module = ''; so it become to:

$incompatible_updates_exist = FALSE;
$bad_module = '';
foreach ($updates as $module => $update) {

At line 73 we store the problematic module's name after $incompatible_updates_exist = TRUE;, code is $bad_module = $bad_module. ' & ' . $module;

      $incompatible_updates_exist = TRUE;
      $bad_module = $bad_module. ' & ' . $module;
      continue;    

At line 110 we need to show the names after error message. Code became this:

      if ($incompatible_updates_exist) {
        drupal_set_message('Some of the pending updates cannot be applied because their dependencies were not met. Bad modules: '.$bad_module, 'warning');
      }

The diff update.php update.php.backup result should be something like this:

root@Ammon:/usr/share/drupal7# diff update.php update.php.bkup 
62d61
<   $bad_module = '';
73d71
<       $bad_module = $bad_module. ' & ' . $module;
110c108
<     drupal_set_message('Some of the pending updates cannot be applied because their dependencies were not met. Bad modules: '.$bad_module, 'warning');
---
>     drupal_set_message('Some of the pending updates cannot be applied because their dependencies were not met.', 'warning');

2. Run update.php again

Go to http://YOU_DOMAIN_NAME/update.php to find the module names.

3. Remove bad modules

Remove these modules from /etc/drupal/7/sites/all/modules/ and run update.php again.

4. Login and enjoy!

Login with http://YOU_DOMAIN_NAME/user/login or http://YOU_DOMAIN_NAME/?q=user/login Your loved site should be now ready for you.

Hope this HOWTO can save a tree and a kitten.

Comments

online casino gambling play casino casino online casino blackjack | https://onlinecasinodd.com/ - slots for real money https://onlinecasinodd.com/ - bovada casino

online casino slots free slots online no download free penny slots slots games | https://slotsonliners.com/ - free slots vegas https://slotsonliners.com/ - hot shot casino slots

vegas free slots free slots games online slots real money free slots hollywood | https://slotsonliners.com/ - jackpot party casino slots https://slotsonliners.com/ - free casino slots no download

a https://sildenafilcitrateph24.com# sildenafil
sildenafil generic
sildenafila
sildenafil 20 mg
sildenafil citrate sildenafil

r https://sildenafilcitrateph24.com# sildenafil 20 mg
sildenafil
buy sildenafil online
sildenafila
sildenafil citrate sildenafil dosage

online casino bonus free online casino slots online casino slots for real money | https://onlinecasino888.us.org/ - online casino real money https://onlinecasino888.us.org/ - gsn casino slots

bovada casino bovada casino online casinos for us players casino real money | https://onlinecasinodd.com/ - slots for real money https://onlinecasinodd.com/ - mgm online casino

p https://cialiscanadaph24.com# cialis online from canada
cialis online canada
cialis canada pharmacy
buy cialis canada cialis in canada

free slot play no download free slot play no download online casino slots free online slots vegas world | https://slotsonliners.com/ - online slots real money https://slotsonliners.com/ - hollywood casino online slots

bovada casino betfair online casino online gambling casino casino online - https://onlinecasinoplay.us.org/ - casino online - https://onlinecasinoplay.us.org/ - online casino real money

d https://sildenafilcitrateph24.com# sildenafil dosage
sildenafil citrate 100mg
sildenafil 20 mg
sildenafil 20 mg
sildenafil sildenafil

casino slots free games hollywood casino online slots free online casino slots no download real casino slots | https://slotsonliners.com/ - online slots free https://slotsonliners.com/ - slot machines

betfair online casino online casino bonus online casino gambling gsn casino slots | https://onlinecasino888.us.org/ - casino real money https://onlinecasino888.us.org/ - online casino slots

e https://sildenafilcitrateph24.com# sildenafil citrate
sildenafil 20 mg
sildenafil dosage
sildenafil citrate 100mg
sildenafila sildenafil dosage

casino slots online casinos betfair online casino casino slots - https://onlinecasinoplay.us.org/ - slots for real money - https://onlinecasinoplay.us.org/ - online casino

slots online play slots online casino slots online slots free | https://slotsonliners.com/ - online casino slots https://slotsonliners.com/ - cashman casino slots

real casino slots online slots real money gold fish casino slots free online slots | https://casinoslotsplay.us.org/ - vegas casino slots https://casinoslotsplay.us.org/ - free games online slots

free online slots no download real casino slots slots online free games online slots | https://casinoslots24.us.org/ - world class casino slots https://casinoslots24.us.org/ - world class casino slots

play slots world class casino slots world class casino slots slot machines | https://casinoslots24.us.org/ - free online slots games https://casinoslots24.us.org/ - slot machines

mgm online casino online casinos for us players online casino real money online casino real money - https://onlinecasinoplay.us.org/ - online casinos for us players - https://onlinecasinoplay.us.org/ - bovada casino

casino real money online casino bovada casino play casino - https://onlinecasinoplay.us.org/ - gsn casino games - https://onlinecasinoplay.us.org/ - online casino real money

gsn casino games mgm online casino online gambling real money casino | https://online-casinos.us.org/ - online gambling casino https://online-casinos.us.org/ - casino online

online slots free world class casino slots vegas slots online online slot games | https://casinoslots24.us.org/ - play slots online https://casinoslots24.us.org/ - gold fish casino slots

world class casino slots best online slots slot games online slot games | https://casinoslotsplay.us.org/ - free online slots no download https://casinoslotsplay.us.org/ - world class casino slots

real money casino slots for real money free online casino slots casino online - https://onlinecasinoplay.us.org/ - online casino gambling - https://onlinecasinoplay.us.org/ - online casinos for us players

online slots free free games online slots turning stone online slots cashman casino slots | https://casinoslots24.us.org/ - gold fish casino slots https://casinoslots24.us.org/ - cashman casino slots

online casino slots online gambling casino online casino games online casino - https://onlinecasinoplay.us.org/ - casino online - https://onlinecasinoplay.us.org/ - best online casino

online casino slots slots for real money bovada casino online casinos | https://online-casinos.us.org/ - real money casino https://online-casinos.us.org/ - free online casino slots

mgm online casino online casino bonus bovada casino real money casino - https://onlinecasinoplay.us.org/ - online casino gambling - https://onlinecasinoplay.us.org/ - casino real money

online casino games casino real money online casino games gsn casino games | https://onlinecasinoplay777.us.org/ - slots for real money https://onlinecasinoplay777.us.org/ - online gambling

free online slots no download free online slots no download online slots free online slots free | https://casinoslotsplay.us.org/ - slot games https://casinoslotsplay.us.org/ - free online slots no download

slots for real money casino slots real money casino casino slots | https://onlinecasino888.us.org/ - real money casino https://onlinecasino888.us.org/ - mgm online casino

Pages

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.