Disappearing Comments After Drupal 6.13 Upgrade

Sam Lerner

on

November 13, 2009

Disappearing Comments After Drupal 6.13 Upgrade

We recently upgraded core for civicactions.com, and found a nasty bug where comments were no longer appearing on blog posts. They were listed in the admin, and even in the Recent Posts block, but would not show after the blog content.

After some sleuthing, I discovered an error message in dblog whenever a blog page was visited:

Unknown
column "u.signature_format" in "field list" query: pager_query /* admin
: pager_query */ SELECT c.cid as cid, c.pid, c.nid, c.subject,
c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid,
u.name AS registered_name, u.signature, u.signature_format, u.picture,
u.data, c.thread, c.status FROM comments c INNER JOIN users u ON c.uid
= u.uid WHERE c.nid = 1595 ORDER BY c.cid LIMIT 0, 10 in comment.module
on line 992.


A quick Google search turned up this support post on Drupal.org and an answer that looked promising. I ran update.php, set the system module version to 6051, and ran the update. The changes to the signatures were reverted, and the comments are back!

What disturbs me is, what happens the next time I have to upgrade core? This problem first occurred when we upgraded to 6.14 (we went straight from 6.12 to 6.14), and will likely happen in 6.15 if it's not fixed. There's already been at least 3 updates to the system module since 6051, but I can't find anything in the Drupal issue queue. In fact, a Google search for "Unknown column u.signature_format in field list query" turns up the above solution on Drupal.org, and then a list of Drupal sites currently displaying that error!

Hopefully this helps anyone encountering this problem, and starts some movement towards finding a permanent fix.

Share it!

Nice work, been following your blog from some time now, keep up the good work. http://bowtrolcoloncleanserreview.com/

 

Hey this is really nice information. I was looking for something similar like this. Thanks for this useful information. Acai Berry Colon Cleanse Acai Acai Berry

upgrading seems tricky

Thanks for sharing your expertise!

Wartrol

I have been reading your post regularly. They are highly informative and helpful. Acai Berry

Bevan, I see what you mean about "reverted" being the wrong word, since an update can only make changes. From the post on drupal.org, it looks like others encountered the same problem, so if that update is being skipped, something must be wrong with the update proceedure. It wasn't until I explicitly ran the 6051 update through update.php that the signature_format column was added, when it should have been added when we upgraded to 6.14.

I haven't seen an issue posted for this yet, which makes me wonder if it's isolated to certain configurations.

...but it seems that somehow this update (system 6051) was skipped (or needed to be re-run).

Unless I'm mistaken, selecting a particular update on update.php does not roll back at all, but selects an update to roll forward too.

To be honest it sounds like user error in this case. Update.php always needs to be run after an update.

Is there a core issue for this bug?

"The changes to the signatures were reverted, and the comments are back!"

 

Running update.php caused the signature_format column to be added to the users table. It did not revert "changes to the signatures".

 

Did you run update.php when you upgraded from 6.12 to 6.14? Did anything go wrong during that update?