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

play slots online slots online free online slots no download casino slots | https://casinoslotsplay.us.org/ - play slots https://casinoslotsplay.us.org/ - online casino slots

play slots online slot games slot machines real casino slots | https://casinoslots24.us.org/ - online slots real money https://casinoslots24.us.org/ - hollywood casino online slots

vegas world free games online slots free online slots vegas slots online play slots | https://casinoslotsplay.us.org/ - play slots online https://casinoslotsplay.us.org/ - online slots

h viagra without a doctor prescription viagra without a doctors prescription
viagra without prescription fda
http://starlite.id/viagra-without-a-doctor-prescription/# viagra without prescription

hollywood casino online slots free games online slots online casino slots slot machines | https://casinoslots24.us.org/ - vegas casino slots https://casinoslots24.us.org/ - slots games

online casino gambling play casino casino real money best online casinos | https://onlinecasinoslotsmaxx.com/ - best online casino https://onlinecasinoslotsmaxx.com/ - gsn casino slots

best online casinos online casinos bovada casino online casino bonus - https://onlinecasinoplay.us.org/ - casino blackjack - https://onlinecasinoplay.us.org/ - best online casino

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

casino play mgm online casino online casino games gsn casino games | https://onlinecasinoplay777.us.org/ - online casinos for us players https://onlinecasinoplay777.us.org/ - online casino bonus

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

betfair online casino mgm online casino online casino bonus bovada casino - https://onlinecasinoplay.us.org/ - best online casinos - https://onlinecasinoplay.us.org/ - best online casino

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

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

real money casino online casino online casino bonus casino play | https://online-casinos.us.org/ - real money casino https://online-casinos.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.