VotingAPI Bug Hunt Postmortem

Updated: Sun, Jul 27, 2008 - 6:49pm
Type
Status

I just struggled with a ...bug?? that drove me a little crazy.  My site was chugging along just fine and then I would save a node, or a configuration or something, and suddenly all my views that used votingapi would blow up.


I kept looking for things that caused it -- was it the module I just enabled?  Was it this?  That?

I found out the problem, and it was subtle.

When the views blew up, I looked at the views UI screen and found that all my references to votingapi fields and sorts had been messed up -- replaced with blank lines with no descriptions and no options.

I found out that, when the views module called "module_implements('views_tables')", the votingapi module had not been loaded yet.

The solution:  I had to go into my database and decrease the module weight of votingapi.

  1. UPDATE system SET weight=-1 WHERE name='votingapi' AND type='module';

Apparently, the two modules had the same weight, so whether or not they loaded in a propitious order depended on the random whims of their order in the database, which would sometimes change when I poked random data in there.

I don't think this is actually a bug, so much as an inevitable consequence of drupal. But mostly, something that a potential user of votingapi should know about.

Your rating: None Average: 4.3 (4 votes)