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

free online slots no download hollywood casino online slots free online slots games slots online | https://online-casinoslots.us.org/ - gold fish casino slots https://online-casinoslots.us.org/ - gold fish casino slots

free online slots free online slots vegas world free games online slots vegas slots online | https://casinoslotsonline.us.org/ - slot machines https://casinoslotsonline.us.org/ - turning stone online slots

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

j ed meds online without doctor prescription levitra without a doctor prescription
ed meds online without doctor prescription fda
http://starlite.id/levitra/# fda

best online slots world class casino slots turning stone online slots online slots free | https://casinoslotsonline.us.org/ - free games online slots https://casinoslotsonline.us.org/ - free games online slots

real casino slots online slot games online slots real money vegas world free games online slots | https://online-casinoslots.us.org/ - free online slots https://online-casinoslots.us.org/ - vegas world free games online slots

free online slots vegas world gold fish casino slots free online slots no download play slots online | https://casinoslotsonline.us.org/ - gold fish casino slots https://casinoslotsonline.us.org/ - slots online

online gambling online casino online casino games casino slots | https://onlinecasino888.us.org/ - online casino games https://onlinecasino888.us.org/ - betfair online casino

online slots real money world class casino slots online slots free real casino slots | https://online-casinoslots.us.org/ - free online slots games https://online-casinoslots.us.org/ - gsn casino slots

j levitra without a doctor prescription buy levitra
generic levitra vardenafil 20mg buy levitra
http://starlite.id/levitra/# generic levitra vardenafil 20mg

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

online casino slots free games online slots free online slots games best online slots | https://casinoslotstime.com/ - gsn casino slots https://casinoslotstime.com/ - vegas casino slots

hollywood casino online slots free online slots games slot machines free online slots | https://slotsonliners.com/ - free games online slots https://slotsonliners.com/ - world class casino slots

online slots world class casino slots online slots real money vegas casino slots | https://casinoslotstime.com/ - online slots https://casinoslotstime.com/ - online slots real money

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

turning stone online slots gsn casino slots turning stone online slots online casino slots | https://casinoslotstime.com/ - online slots real money https://casinoslotstime.com/ - turning stone online slots

v viagra without prescription ed meds online without doctor prescription
starlite viagra buy viagra without prescription
http://starlite.id/viagra-without-a-doctor-prescription/# viagra without a doctor prescription

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

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

online casino games online casino slots for real money casino play - https://onlinecasinoplay.us.org/ - casino blackjack - https://onlinecasinoplay.us.org/ - online gambling

online casino bonus online casinos slots for real money online casino slots | https://onlinecasinoslotsmaxx.com/ - best online casinos https://onlinecasinoslotsmaxx.com/ - casino real money

real money casino casino games play casino play casino | https://onlinecasinoslotsmaxx.com/ - mgm online casino https://onlinecasinoslotsmaxx.com/ - casino real money

online gambling casino play online casino games play casino | https://onlinecasinoslotsmaxx.com/ - online casino slots https://onlinecasinoslotsmaxx.com/ - free online casino slots

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

world class casino slots online slots world class casino slots hollywood casino online slots | https://casinoslots24.us.org/ - free online slots games https://casinoslots24.us.org/ - cashman casino slots

world class casino slots turning stone online slots gsn casino slots free games online slots | https://casinoslotsplay.us.org/ - cashman casino slots https://casinoslotsplay.us.org/ - free games online slots

casino slots play casino casino online online casino slots | https://onlinecasinoslotsmaxx.com/ - free online casino slots https://onlinecasinoslotsmaxx.com/ - casino real money

online casino bonus online casinos for us players online casino games online gambling - https://onlinecasinoplay.us.org/ - best online casinos - https://onlinecasinoplay.us.org/ - betfair 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.