After having updated a node that uses a pollfield field I ran cron and got the following 2 errors:

  • User warning: Table 'cyw.content_' doesn't exist query: SHOW COLUMNS FROM content_ LIKE 'delta' in _db_query() (line 149 of [...]/site/includes/database.mysqli.inc).
  • User warning: Table 'cyw.content_' doesn't exist query: UPDATE content_ set field_poll_active = 0 WHERE nid = 438 in _db_query() (line 149 of [...]/site/includes/database.mysqli.inc).

Guilty line is 1033 of pollfield.module:
$db_info = content_database_info($fields[$field_name]);

It should be:
$db_info = content_database_info($fields[$pollfield->field_name]);

Patch enclosed.

CommentFileSizeAuthor
pollfield-cron.patch529 bytesbenoit.borrel

Comments

mario_prkos’s picture

Thanks, can you say what CCK version you use.

benoit.borrel’s picture

sure, 6.x-2.9.

bryan kennedy’s picture

Assigned: Unassigned » bryan kennedy
Priority: Normal » Major

I can confirm that this is happening with the latest version of pollfield (dev) and the latest version of CCK for D6.

Steps to reproduce.

1. Create a poll and change it's authoring date to some date in the past, like a year ago.
2. Set this poll to expire in 1 day, or any value that will cause the poll to expire.
3. Run cron and you you will get these errors.

bryan kennedy’s picture

Status: Needs review » Fixed
Issue tags: +cron

Thanks for the patch benoit.borrel. I tested the fix with several cron runs and it seems to work as expected now.

I've committed this to the dev branch and will roll it into a new version when we release that soon.

Status: Fixed » Closed (fixed)
Issue tags: -cron

Automatically closed -- issue fixed for 2 weeks with no activity.