Hi guys,

I'm taking over a website for a client that is runing under drupal 5. but the website is a big mess.

A bunch of modules installed but not enabled,
the contributed modules are mixed with the core ones, same for the themes.

The update php returned me these

"The following queries were executed
system module
Update #1022

* Failed: ALTER TABLE {users} ADD KEY created (created)

comment module
Update #1

* No queries
"

are these bad?

Plus how do you guys take over a messy website? do you have any hints?

Thanks

Comments

Garrett Albright’s picture

Look in the {system} table of the database. It should tell you where it's expecting to find installed modules and themes. Get those in place, then give update.php another try.

abdelatifs’s picture

Hello Guys,

I just got a drupal 5 site to fix and found out that the contributed modules were mixed with the core ones.

i'd like to clean this up but i was wondering, if i move those modules to were they belong, is the website will still be able to find them?

and what is the correct procedure for that?

thanks

Garrett Albright’s picture

If you need to move a module from one directory to another, the best process is to disable the module -- don't uninstall it; just disable it. Uninstalling it will delete any data associated with the module. While it's disabled, move the module to the correct directory. Then enable it again.

So long as the module follows proper Drupal behavior standards, that should be all; however, be sure you've backed up your database beforehand, because it's theoretically possible that a custom or poor-quality contrib module could do something unstandard such as delete data when it's disabled instead of when it's uninstalled.

abdelatifs’s picture

Thanks garrett,

that's what I was thinking too,
Thank you very much.

abdelatifs’s picture

hello,

I've done this and it seems like the modules don't appear anymore under the modules list.
any idea?

thanks

Garrett Albright’s picture

Okay, well, are the modules still in one of the module directories?

abdelatifs’s picture

for some reason my subversion didn't commit the changes.

I might have another question if you don't mind.

I have this huge database that i want to use to install a local copy of the website, do you know which tables i can clean up to have the smallest file as possible?

thanks.

Garrett Albright’s picture

I couldn't tell you absolutely for D5, but for D6, you can make do without the watchdog and sessions tables, plus all of the cache tables. You can also make do without the search tables, though that means you'll probably want to rebuild your search index after restoring from a SQL dump (if your site uses searching, anyway). And you can also compress your database dump files to save even more space; database dumps have a lot of redundant text, so they compress really well. Here's a magical incantation I use for small database dumps; the "sed" part in the middle tosses out the unessential data.

mysql -u[username] -p[password] [database] | sed -E -e "/^INSERT INTO \`(cache|watchdog|search|sessions)/d" | bzip2 --best > [database].sql.bz2