Closed (fixed)
Project:
Advanced Poll
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Apr 2012 at 12:28 UTC
Updated:
28 May 2015 at 04:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Michele Wickham commentedThere is a new build - 7.x-3.x - let me know if this one addresses the problem. I was not able to reproduce the error, but my suspicion is that the form was not rendered as markup properly.
Comment #2
Michele Wickham commentedComment #3
Michele Wickham commentedComment #4
Michele Wickham commentedAssuming this issue has been resolved. Create a new bug report if not.
Comment #5
gaxze commentedStill occuring for me using 7.x-3.x-dev.
After uninstalling voting rules - this error went away.
so issue is with voting rules?!
Comment #6
adam_b commentedSame as GaxZE - uninstalled Voting Rules and the error disappeared. Unfortunately, Voting Rules is what I wanted... :(
I've reported this in #1810474: Ajax error with Advanced Poll
Comment #7
kappaluppa commentedThe other post goes on to describe more here https://drupal.org/node/1810836 but I still don't see it as fixed. But definitely sounds like its the Voting Rules issue.
Comment #8
jordanmagnuson commentedI don't have Voting Rules installed, but I am seeing this problem.
Comment #9
cchoudhary commentedSame as GaxZE and adam_b, i am also getting same error. I need both advanced poll and and voting rules module be working, but having difficulty in fixing this issue.
solutions suggested in https://drupal.org/node/1810836 were also not helpful.
Comment #10
vsavovski commentedI'm not sure I'm heading in right direction, but as far as I could trace this, it looks like that advpoll module is presenting it's self as entity rather than bundle of node entity. If you take a look here: http://cgit.drupalcode.org/advpoll/tree/advpoll.module?h=7.x-3.x#n745 and later here: http://cgit.drupalcode.org/advpoll/tree/includes/advpoll_voteapi.inc?h=7... you'll notice that.
While this works for advpoll module, it doesn't work for voting_rules, because voting_rules actually expects real entity type here. I haven't tried to replace line: http://cgit.drupalcode.org/advpoll/tree/advpoll.module?h=7.x-3.x#n739 with 'node' instead of 'advpoll', but I have used this as temporary solution:
Comment #11
paulihuhtiniemi commentedAs said in #10, Advanced Poll specifies entity type as "advpoll" where it should be node when using votingapi. Here's a patch that fixes this.
Comment #12
paulihuhtiniemi commentedThere were more places, where entity type was wrong.
Comment #13
paulihuhtiniemi commentedIn function advpoll_user_eligibility() $node->type was used instead of entity type, updated patch.
Comment #14
jordanmagnuson commentedGreat catch Paul: your latest patch seems to solve the problem. The change seems to make the old poll data inaccessible, though (all my old polls are now showing 0 votes)... I assume something to do with the way voting api works?
Anyway, will continue to test and let you know if I find any further issues...
Comment #15
tripper54 commentedComment #16
tripper54 commentedComment #17
tripper54 commentedThanks for finding and fixing these errors.
We'll need an update function to change the entity_type value on each existing vote from 'advpoll' to 'node', otherwise the existing votes won't tally properly.
Comment #18
tripper54 commentedAdded update function to correct the entity type value for already cast votes.
Comment #19
jordanmagnuson commentedI think #18 is what we're looking for -- worked great on my site. Thanks tripper54!
Comment #20
tripper54 commentedComment #21
tripper54 commentedOK, committed, thanks everybody!