Not Surprised...
Last time I checked in I had a Drupal project that was self-destructing on me. Every admin settings page was acting strangely. Modules shut themselves off, themes would become disabled all by just clicking "Save Configuration".
Turns out, playing around with theme overrides can bite you in the butt.
I had the need to have each record in a table be it's own form. After attempting to add the form code to either the headers array or somewhere in the rows I realized I would have to override the table theme.
I brought the table theme function over and modified it to my liking and placed it in my template.php file. And so began the problems.
Anytime that template was being used during a settings change, each row was it's own form. So when clicking "Save Configuration" It would only process one item from the table. That is what caused modules to become disabled. It makes sense to me now, but at the time was the most bizarre thing I had encountered yet.
The solution was to move the modified table theme directly into the module that needed it. This kept it from affecting other tables in the administrative area.
Every so often I am reminded of how robust Drupal is as a system. You can really do some strange things to it and it keeps on ticking. Even if it might act a little weird. Other systems that I have used just bomb right out at the first dumb thing you do with them.
As commendable as that is, it sure can make it hard to figure out what you broke.
- jimmynash's blog
- Login to post comments
