I installed this module for the first time on my site and am getting:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'captcha_type' in 'field list'

I see a lot of posts that report this as a problem with updating the module, but that's not my problem. Please help!

Comments

soxofaan’s picture

Where did you download the module from? From the project page (http://drupal.org/project/captcha) on drupal.org or through git?

On what page did/do you get this error? Is that the complete message?

brandy.brown’s picture

I downloaded it from the project page. I get this error when visiting any page, even the home page. The full error is:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'captcha_type' in 'field list': SELECT module, captcha_type FROM {captcha_points} WHERE form_id = :form_id; Array ( [:form_id] => search_block_form ) in captcha_get_form_id_setting() (line 73 of /sites/all/modules/captcha/captcha.inc).

I get this error whether I am using beta2 or dev versions. When I try to run update.php, it just throws the error again, doesn't run updates.

soxofaan’s picture

Have you already tried to disable, uninstall and then reinstall the module?

brandy.brown’s picture

yeah. the problem still persists.

soxofaan’s picture

Do you know how to work with a database tool like for example PhpMyAdmin and could you e.g. post a screenshot of the schema/structure of the captcha_points table?

brandy.brown’s picture

StatusFileSize
new109.67 KB

I've attached the screenshot.

brandy.brown’s picture

I've attached the screenshot.

soxofaan’s picture

So the "captcha_type" column is called "type" in your database?

This column was indeed called "type" but was changed to "captcha_type" around december 2010 (#825088: Exportables support for CAPTCHA points , http://drupalcode.org/project/captcha.git/commit/a0583ff0a9d5e85433d8717...).

A fresh install would not use "type" but "captcha_type". Are you sure that the CAPTCHA module was never before installed on your site in some way?

And when I asked to uninstall in #3, I mean not just disabling by toggling the checkbox, but really uninstalling (from the module uninstall tab), so that the database tables are removed. Can you verify that after uninstall the tables are gone and install again?

brandy.brown’s picture

I will try an uninstall, but yes I'm positive this module was never installed on this site.

chris matthews’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

I'm closing this 6 year old support request as cannot reproduce.