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)

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
          _              _                  
_ __ | | __ _ __ | |_ __ _ ___
| '_ \ | |/ / | '_ \ | __| / _` | / _ \
| | | | | < | | | | | |_ | (_| | | __/
|_| |_| |_|\_\ |_| |_| \__| \__, | \___|
|___/
Enter the code depicted in ASCII art style.