Help! DB is trashed
Disaster!
As the administrator (Drupal 6.5), I tried to delete a content type I had created, which I no longer needed. The page indicated this would be a permanent change, I said proceed.
The Firefox page hung at that point, with a blank page and a busy cursor, steady disk access every second or so.
After several hours, I closed the Firefox tab and logged back in (I am running as localhost).
Now, everything is messed up. The administer pages no longer seem to know about modules, or views, or content types, or many other things. Create content shows no available types, including the default Page and Story. Content Management knows about Books, Comments, and Date Import/Export. No existing content appears.
Status report doesn't indicate anything out of the ordinary.
The Administer Page shows the following:
=====================================================
Welcome to the administration section. Here you may control how your site functions.
Content management
Manage your site's content.
Books
Manage your site's book outlines.
Comments
List and edit site comments and the comment moderation queue.
Date Import/Export
Import and export date data.
Panels
Administer items related to the Panels module.
Export panels
Export panels in bulk.
Mini panels
Create and administer mini panels (panels exposed as blocks).
Node panes
Information about the content node content type.
Panel nodes
Panel nodes are nodes that are laid out with panel displays.
Panel pages
Create and administer panel-pages (complex layout pages with URLs).
User management
Manage your site's users, groups and access to site features.
Access rules
List and create rules to disallow usernames, e-mail addresses, and IP addresses.
Reports
View reports from system logs and other status information.
Recent log entries
View events that have recently been logged.
Available updates
Get a status report about available updates for your installed modules and themes.
Status report
Get a status report about your site's operation and any detected problems.
Site building
Control how your site looks and feels.
Blocks
Configure what block content appears in your site's sidebars and other regions.
Site configuration
Adjust basic site configuration options.
Actions
Manage the actions defined for your site.
CCK Fieldgroup Tabs
Configuration for CCK fieldgroup tabs
Logging and alerts
Settings for logging and alerts modules. Various modules can route Drupal's system events to different destination, such as syslog, database, email, ...etc.
Supernav Settings
Global configuration of Supernav functionality.
Date PHP4
Date PHP4 setup.
===========================================================
The Home page actually works correctly (I have changed the default page to a page made with views and panels). Clicking on the links on the Home page seems to work, bringing up various stories and custom content types.
I can log in as various users.
Any clues as to what might be fixable here?
Alternatively, how do I start over? The current system was the result of a week's worth of work:( If I drop the database, will it re-initialize? Or, do I need to mess with settings.php or something?
Sadly,
brew

I don't know if I'd drop the database
Otherwise you wouldn't find out what happened and learn.
Can you tail the apache error and access logs?
Can you check the watchdog tables for errors from phpmyadmin or the mysql shell, or check the database integrity?
http://www.universalpantograph.com
Try running update.php once,
Try running update.php once, even if you don't have any updates. It cleans-up some things.
Don't you see any modules or themes in the admin/build/modules and admin/build/themes pages?
Tried update.php
I think I ran the update.php - I assume this is what runs when you click the "check updates" link from the status report. Can I just run this in a browser (drupal/update.php)? I will try this this evening.
As shown in the previous listing, no modules or themes are listed anywhere, although they are being used - things are clearly badly screwed. For example, the SuperNav module is present and operating, and I can configure it, but there is no module admin list.
I looked in Error logs and didn't see anything interesting. I will have to look in the Apache directories and see if anything is there (I am not at that computer at the moment).
Sadly,
brew
Yes, run update.php with
Yes, run update.php with your browser. In Drupal 6, it rebuilds the menu cache.
If it does not complete cleanly, one possibility is that your php memory is insufficient for your installed modules (see http://drupal.org/node/207036)
Also check if your /admin/reports/status page reports any problems.
Memory limit
I did set the limit to 16M in the Apache configuration. However, I have been adding various modules, so I will bump that number.
What is the symptom when the number is too low? Does it just run slow, or should I see an error message or something?
Hmm, I see that there are three methods of setting this. I will need to check the three. What order do they evaluate in? I might have them conflicting, so I don't get as much memory as I thought.
brew
32M or even 64M are not
32M or even 64M are not unusual values. The symptom is that some memory-hungry operation crashes before it is completed, and that may result either in a blank page or in weird behavior caused by half-written data. An example of a memory-hungry operation is image resizing. Maybe it happened with the menu building.
I think that setting memory_limit in php.ini has the lowest priority, so that it can be overrided by .htaccess for a directory and its subdirectories, which in turn can be overrided at runtime inside a running script (settings.php). I wanted to verify it but I never did.
memory settings
OK, I checked my system.
I have php.ini set to
memory_limit = 128M
post_max_size = 16M
nothing in .htaccess that I can see, or in settings.php.
Seems like this should be enough:)
brew
you can run update.php like this in the browser
http://www.example.com/update.php
I'm wondering if the menu table is messed up, so handlers to build the pages aren't being dispatched correctly. Is devel installed? Can you get the block to run PHP code to show? You could try running devel's menu rebuilding function from the box. (Though I wish I knew a way to check the integrity of the menu table; is there one?)
http://www.universalpantograph.com
devel installed?
Sorry - I am too new to know - is devel a module? I didn't add a separate module by that name.
I also don't know what it means to "get the block to run PHP code to show". It sounds like if I run update.php, the menu would be rebuilt. I will try that tonight.
brew
Hallelujah!
I ran the update.php script, and it seems to have restored things to the normal state. My modules are back, along with the various content I had built. It looks great! Apparently the menus needed to be rebuilt, as several people surmised. Thank You!
Now, off to back up the database, etc.
In the error logs, there was one entry of note -
Details
Type actions
Date Monday, October 20, 2008 - 19:33
User geek1
Location http://localhost/asras1/admin/settings/actions
Referrer http://localhost/asras1/supernav_left
Message One orphaned action (workflow_select_next_state_action) exists in the actions table. Remove orphaned actions
Severity warning
Hostname 127.0.0.1
Operations
It looks like it wants me to do the link to remove the "orphaned action", but I don't think that was my problem.
So, don't know yet what happened to cause this; as noted below, I have 128M memory set in php.ini. However, I am back in action again.
Thanks to everyone!
brew