I somehow managed to make a really big mistake.

When upgrading to Drupal 6.17, I must have uploaded the drupal-6.17 folder to /home/sites/all/modules. So now I have:

/home/ --> all of my current drupal files
/home/modules ---> current core modules
/home/sites/all/modules/drupal-6.17 --> all of the 6.17 files
/home/sites/all/modules/drupal-6.17/modules --> all of the core modules from 6.17

I discovered this when trying to upgrade to drupal-6.19, and Drupal kept reporting that there was still an upgrade available.

I tried deleting all files and installing fresh, but that broke everything because somehow, my database has been updated with /home/sites/all/modules/drupal-6.17/modules/ for many of the modules.

I tried replacing /home/sites/all/modules/drupal-6.17/modules/ with modules/ in a backed up copy of my database and uploading that. That didn't work, and now I'm stuck.

Does anyone know what I can do to fix this?

Thanks.

Julianna

Comments

hershel’s picture

You could try removing any rows in your table with /home/sites/all/modules/drupal-6.17/modules/ and of course be sure to remove /home/sites/all/modules/drupal-6.17

If that fails, let us know what precisely is the error and also what you see in the system table.

julianna’s picture

It looks like this is where /home/sites/all/modules/drupal-6.17/modules/ is showing:

menurouter, in file (e.g. sites/all/modules/drupal-6.17/modules/system/system.admin.inc)
system, in filename (e.g. sites/all/modules/drupal-6.17/modules/update/update.module)

If I remove these rows, will Drupal still be able to run?

hershel’s picture

If system.admin.inc only appears once and it looks like that, you could try to edit such rows instead of removing them.

julianna’s picture

This is what I did:

1. Downloaded all the files and database as a backup
2. Uploaded what was in /home/sites/all/modules/drupal-6.17 to /home
3. Ran update.php --- no updates
4. Checked website --- everything was ok.
5. In the backed up db file, replaced sites/all/modules/drupal-6.17/modules/ with modules/
6. Confirmed that the only remaining reference to 6.17 was in the drupal version information
7. Imported the changed db file
8. Tested the site --- every page is now blank!
9. Restored the original backed up db file
10. Tested the site --- the original db file reset the site to it's proper state.

Not sure what to try now. All of the references to files in sites/all/modules/drupal-6.17/modules/ only occur once (e.g. only one reference to system.admin.inc. I figured copying the files from /home/sites/all/modules/drupal-6.17/ to /home/ would remove any version problems, but that doesn't seem to be the issue.

Here are the modules in the system table that are referenced:

sites/all/modules/drupal-6.17/modules/system/system.module
sites/all/modules/drupal-6.17/modules/aggregator/aggregator.module
sites/all/modules/drupal-6.17/modules/block/block.module
sites/all/modules/drupal-6.17/modules/blog/blog.module
sites/all/modules/drupal-6.17/modules/blogapi/blogapi.module
sites/all/modules/drupal-6.17/modules/book/book.module
sites/all/modules/drupal-6.17/modules/color/color.module
sites/all/modules/drupal-6.17/modules/comment/comment.module
sites/all/modules/drupal-6.17/modules/contact/contact.module
sites/all/modules/drupal-6.17/modules/dblog/dblog.module
sites/all/modules/drupal-6.17/modules/filter/filter.module
sites/all/modules/drupal-6.17/modules/forum/forum.module
sites/all/modules/drupal-6.17/modules/help/help.module
sites/all/modules/drupal-6.17/modules/locale/locale.module
sites/all/modules/drupal-6.17/modules/menu/menu.module
sites/all/modules/drupal-6.17/modules/node/node.module
sites/all/modules/drupal-6.17/modules/openid/openid.module
sites/all/modules/drupal-6.17/modules/path/path.module
sites/all/modules/drupal-6.17/modules/php/php.module
sites/all/modules/drupal-6.17/modules/ping/ping.module
sites/all/modules/drupal-6.17/modules/poll/poll.module
sites/all/modules/drupal-6.17/modules/profile/profile.module
sites/all/modules/drupal-6.17/modules/search/search.module
sites/all/modules/drupal-6.17/modules/statistics/statistics.module
sites/all/modules/drupal-6.17/modules/syslog/syslog.module
sites/all/modules/drupal-6.17/modules/taxonomy/taxonomy.module
sites/all/modules/drupal-6.17/modules/throttle/throttle.module
sites/all/modules/drupal-6.17/modules/tracker/tracker.module
sites/all/modules/drupal-6.17/modules/translation/translation.module
sites/all/modules/drupal-6.17/modules/trigger/trigger.module
sites/all/modules/drupal-6.17/modules/update/update.module
sites/all/modules/drupal-6.17/modules/upload/upload.module
sites/all/modules/drupal-6.17/modules/user/user.module

And the ones in menu_router:

sites/all/modules/drupal-6.17/modules/system/system.admin.inc
sites/all/modules/drupal-6.17/modules/book/book.pages.inc
sites/all/modules/drupal-6.17/modules/contact/contact.pages.inc
sites/all/modules/drupal-6.17/modules/system/system.admin.inc
sites/all/modules/drupal-6.17/modules/forum/forum.pages.inc
sites/all/modules/drupal-6.17/modules/user/user.pages.inc
sites/all/modules/drupal-6.17/modules/search/search.pages.inc
sites/all/modules/drupal-6.17/modules/profile/profile.pages.inc
sites/all/modules/drupal-6.17/modules/taxonomy/taxonomy.pages.inc
sites/all/modules/drupal-6.17/modules/filter/filter.pages.inc
sites/all/modules/drupal-6.17/modules/node/node.pages.inc
sites/all/modules/drupal-6.17/modules/comment/comment.admin.inc
sites/all/modules/drupal-6.17/modules/comment/comment.pages.inc
sites/all/modules/drupal-6.17/modules/help/help.admin.inc
sites/all/modules/drupal-6.17/modules/user/user.admin.inc
sites/all/modules/drupal-6.17/modules/update/update.report.inc
sites/all/modules/drupal-6.17/modules/block/block.admin.inc
sites/all/modules/drupal-6.17/modules/contact/contact.admin.inc
sites/all/modules/drupal-6.17/modules/statistics/statistics.admin.inc
sites/all/modules/drupal-6.17/modules/dblog/dblog.admin.inc
sites/all/modules/drupal-6.17/modules/statistics/statistics.pages.inc
sites/all/modules/drupal-6.17/modules/path/path.admin.inc
sites/all/modules/drupal-6.17/modules/node/node.admin.inc
sites/all/modules/drupal-6.17/modules/upload/upload.admin.inc
sites/all/modules/drupal-6.17/modules/forum/forum.admin.inc
sites/all/modules/drupal-6.17/modules/filter/filter.admin.inc
sites/all/modules/drupal-6.17/modules/menu/menu.admin.inc
sites/all/modules/drupal-6.17/modules/profile/profile.admin.inc
sites/all/modules/drupal-6.17/modules/search/search.admin.inc
sites/all/modules/drupal-6.17/modules/taxonomy/taxonomy.admin.inc
sites/all/modules/drupal-6.17/modules/update/update.fetch.inc
sites/all/modules/drupal-6.17/modules/node/content_types.inc
sites/all/modules/drupal-6.17/modules/book/book.admin.inc
sites/all/modules/drupal-6.17/modules/update/update.settings.inc
julianna’s picture

It took a while, but I figured out how to fix the problem:

  1. Backup site
  2. Set site to maintenance mode
  3. Backup site again
  4. Go to phpMyAdmin
  5. Go to the system table
  6. Search for all instances of 6.17
  7. Manually edit all of the paths to the correct ones
  8. Test site
  9. Delete /public_html/cultureblast/sites/all/modules/drupal-61.7
  10. Test site - site fails
  11. Go to phpMyAdmin
  12. Go to the menu_router table
  13. Search for all instances of 6.17
  14. Manually edit all the file paths to the correct ones
  15. Run update.php
  16. Run cron
  17. Backup site
  18. Upgrade site
  19. Run cron
  20. Test site
  21. Everything works!
  22. Backup site
troylius’s picture

I did the same thing!

Instead of manually editing each row though, I used the replace command.

In my case I ran the following:

UPDATE `system` SET `filename` = replace(`filename`,"sites/all/modules/drupal-6.20/","")
UPDATE `menu_router` SET `file` = replace(`file`,"sites/all/modules/drupal-6.20/","")

granttoth’s picture

Are there any other tables in the data base that will need to be changed? So far we got two...system and menu_router.

I have some Core files that were moved in to the sites/all/modules directory and I am assuming I will need to edit these entries by hand because the site will die otherwise. correct?