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 slots casino bonus free online casino slots | online gambling casino

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

casino games online casino games online casino bonus casino blackjack | https://online-casinos.us.org/ - online casino bonus https://online-casinos.us.org/ - online casino slots

online casino bonus play casino online casinos real money casino - https://onlinecasinoplay.us.org/ - online casino slots - https://onlinecasinoplay.us.org/ - online casino bonus

mgm online casino slot machines online gambling sites vegas world casino games | https://onlinecasinodd.com/ - grand falls casino https://onlinecasinodd.com/ - slotomania slot machines

virgin casino online nj bovada blackjack jack online casino paradise casino | https://onlinecasino888.us.org/ - online gambling casino https://onlinecasino888.us.org/ - pala casino online nj

free online casino slots casino online best online casino casino blackjack - https://onlinecasinoplay.us.org/ - gsn casino - https://onlinecasinoplay.us.org/ - real money casino

casinos in iowa best online casino bovada casino slot machines | https://onlinecasinodd.com/ - caesars casino online https://onlinecasinodd.com/ - cashman casino

online gambling casino casino blackjack free online casino slots casino blackjack - https://onlinecasinoplay.us.org/ - online gambling - https://onlinecasinoplay.us.org/ - free online casino slots

virgin online casino nj real casino slots on facebook prairie meadows casino free online casino slots | https://onlinecasinodd.com/ - ilani casino https://onlinecasinodd.com/ - best online casinos

online casino slots no download online casino bonus gsn casino maryland live casino online | https://onlinecasino888.us.org/ - turning stone casino https://onlinecasino888.us.org/ - vegas casino online

play slots online slotomania on facebook free penny slots vegas world free slots | turning stone online slots free slot machine games

casinos near me grand falls casino casino blackjack virgin online casino nj | https://onlinecasino888.us.org/ - caesar casino online slot games https://onlinecasino888.us.org/ - casino online

free slots vegas world online casino slots slot machine games free mohegan sun free online slots | free slots no download no registration slots online free

play slots online free slots online turning stone online slots slot machines | free slots no download no registration slots for free

best online casino hollywood casino play4fun royal river casino huuuge casino | https://onlinecasinodd.com/ - rock n cash casino slots https://onlinecasinodd.com/ - casino slots

casino slots slots online best online slots free slot play no download | free slot games online free slots casino games

casino online big fish casino slots doubledown casino vegas world casino games | https://onlinecasinodd.com/ - hollywood casino online https://onlinecasinodd.com/ - zone online casino vegas world

f https://viagragenericforsalerx.com# sildenafil
viagra 100mg pills for sale
generic viagra for sale
viagra generic

da vinci diamonds free online slots vegas slots online free free slots no download no registration free online slots games | https://online-casinoslots.us.org/ - best online slots https://online-casinoslots.us.org/ - cashman casino slots

mohegan sun free online slots online slots casino slots free slots no download | https://casinoslotsonline.us.org/ - free slots casino games https://casinoslotsonline.us.org/ - free slot machine games

casino games slots free free casino slots free online slots games jackpot party casino slots | https://online-casinoslots.us.org/ - casino slots free games https://online-casinoslots.us.org/ - mohegan sun free online slots

play casino pala casino online soaring eagle casino big fish casino slots | https://onlinecasino888.us.org/ - vegas world casino slots https://onlinecasino888.us.org/ - hallmark casino online

free slot games free online slots no download free online slots vegas world free slot play | https://casinoslotsonline.us.org/ - free slots hollywood https://casinoslotsonline.us.org/ - free slots online no download no registration

foxwoods casino online slots dakota sioux casino casino play real money casino | https://onlinecasinodd.com/ - real money casino https://onlinecasinodd.com/ - dakota sioux casino

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

foxwoods resort casino caesar casino online slot games bovada casino cashman casino | https://onlinecasino888.us.org/ - hollywood casino online facebook https://onlinecasino888.us.org/ - online gambling sites

casino bonus cashman casino vegas world casino slots world class casino slots masque | https://onlinecasinodd.com/ - online casino slots https://onlinecasinodd.com/ - gsn casino slots

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

vegas free slots vegas world free games online slots free vegas slots online casino casino slots free games | https://slotsonliners.com/ - free slots games online https://slotsonliners.com/ - gsn casino slots

play slots cashman casino slots mohegan sun free online slots play slots | https://casinoslotstime.com/ - mohegan sun free online slots https://casinoslotstime.com/ - free penny slots

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.