Drupal Eats Itself
Wow! My current drupal project blew up in my face today.
I was looking at how the Administrator Menu I had installed was pushing some items down in my template. To make sure that the floating super menu was the one causing the issue I shut off the module. After saving the configuration in build/modules a whole bunch of modules were shut off.
Whaaaaaaaat!
I tried to re-enable the modules that had been turned off inadvertently, but every time I clicked save, anything I had checked off would not stay, and other modules that were still on were being turned off. "This thing is eating it's own modules.", I thought.
It kept getting worse. If all I did was click "Save Configuration" over and over again, eventually all my modules were disabled, except for the core ones. I manually enabled one module in the system table in the database. Sure enough it was enabled when I visited the modules page. But once I clicked the save button, it was gone again.
Feeling the color drain from my face, all I could think was, "Why do I always forget to back up my database before I mess with contributed modules?". Maybe one of these times I'll learn. Bad habits aside, I needed to fix this quick.
The Cause:
I'm still not sure what happened as all I did was disable the Administration Menu module. I can't blame that module as there were several others that are installed as well. I plan on trying to replicate the problem and if I can I'll update this post.
The Fix:
After my attempts at manually enabling the modules had failed, I moved on to other ideas.
I followed the upgrade instructions thinking that running update.php would reset whatever was broken. No luck.
During that process I managed to log myself out, locking myself out of the site. It had been awhile since I had done that, so I followed some instructions I found on aleph-null.tv to get back in.
I believe that removing the cache record for cid=variables did the trick. After I was logged back into the site, I tried enabling modules and they stayed enabled.
If I can re-create the problem, and the fix turns out to be what I thought, I will update this post.
If this happens to you, this might do the trick, just make sure you backup, backUP, BACKUP!! If you start deleting database records without a full backup you can't get back to the broken state to try something else.
Peace
-nash
- jimmynash's blog
- Login to post comments
