clean, stock drupal 5.1 install, cck-5.x-1.5. Pollfield does not reflect votes -- it registers that a user has voted and provides a button for cancelling his vote, but does not show that any votes have taken place (shows 0 votes registered), and when the user clicks the "cancel my vote" button, it throws an error:

You are not allowed to cancel an invalid poll choice.

Any ideas?

Comments

jamesJonas’s picture

Bug Confirmed. Same setup.

sudeoo’s picture

Confirmed. Me too having the same problem. Anybody any ideas. Some patch or something. Already taken a lot of time.

sudeoo’s picture

Priority: Normal » Critical

Confirmed. Me too having the same problem. Anybody any ideas. Some patch or something. Already taken a lot of time.

adamh’s picture

Is there any solution for this?

adamh’s picture

Status: Active » Needs review

It looks like changing the "table" parameter from cache to cache_content in pollfield_clear function around line 800 in pollfield.module fixes this.

function pollfield_clear($node) {
$cid = 'content:'. $node->nid;
cache_clear_all($cid, 'cache_content', TRUE);
}

Can someone confirm that?

steven jones’s picture

Yeah, seems to fix it!

naught101’s picture

noice! works for me now too! please patch the head version!

xaverx’s picture

I apply this patch, but only administrator can vote, normal user not. He see only blank vote and cant vote.

yngens’s picture

same problem here.

applying suggested change writes an error in logs:

Table 'my_db.cache_content' doesn't exist query: DELETE FROM cache_content WHERE cid LIKE 'content:6435%' in /home/mysite/public_html/includes/database.mysql.inc on line 155.

yngens’s picture

and indeed there is not 'cache_content' table in my DB. there only following tables:

cache
cache_filter
cache_menu
cache_page

Does my DB have incorrect structure or problem is somewhere in the module?

karens’s picture

Status: Needs review » Fixed

Fixed in http://drupal.org/node/151020.

The cache_content table was added to CCK somewhere along the line and would only be missing in an installation that had an outdated CCK version. The pollfield module code by April of 2007 had an if/then to clear the table whether it was named 'cache' or 'cache_content', so that should have worked at the time that the issue was reported.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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