Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


2.0.18b4 gives me a 'bonk' error after enabling this plugin

dlefflerdleffler New
edited September 2011 in Questions
This discussion is related to the Voting addon.
Unable to view, etc... Discussions after enabling plugin and enabling voting. Enabled plugins are: embed, WYSIWYG, & proxy connect.
Tagged:

Best Answer

  • edited September 2011 Answer ✓
    You're right dleffler, it does seem to be working. I was logged in as admin and could vote up until the cows came home, but logged in as a normal user, everything seems to work properly. I guess that's the fix - Nicely done!

Answers

  • FWIW, the error is
    Fatal Error in Gdn_Database.Query();
    Unknown column 'iu.Email' in 'field list'
    and also
    Unknown column 'lcu.Email' in 'field list'

    I can generally get it to work by commenting out (those) lines 322 & 323 in class.voting.plugin.php and ending line 321 with a semi-colon. However, I'm pretty sure this then gives WRONG voting results.

    I'd assume the email fields no longer exist in 2.0.18?
  • edited September 2011
    I get the same issue... I've been poking at this for a while, and I'm not 100% on SQL queries, but it looks like DiscussionModel_AfterDiscussionSummaryQuery_Handler() in class.voting.plugin.php is trying to reference two alises, iu and lcu, which should have been created by DiscussionSummaryQuery(), but perhaps the join on line 73 of class.discussionmodel.php isn't firing?
  • Actually, those lines may not be needed anymore? In the main method (DiscussionSummaryQuery) those fields get selected into the big SQL query statement.
  • edited September 2011
    I took lines 324 & 325 out of class.voting.plugin.php:

    ->Select('iu.Email', '', 'FirstEmail')
    ->Select('lcu.Email', '', 'LastEmail')

    and the Bonk has gone away. I have only a very sparse test forum, but things seem to be working properly... how's it look on your end? (Just be sure to terminate the first Select with a semicolon!)
  • Fresh install, upgrade?
    If upgrade, did you run the utility/structure and/or utility/update?
  • edited September 2011
    In my case, it was a fresh new install, if that helps any, but I did notice that once I removed those two lines in class.voting.plugin.php, I can now vote up an item a hundred times, instead of just vote/remove vote :(
  • I had run both structure & update, and as stated above, commented out the two offensive lines.

    HOWEVER, voting works as advertised on my site with vote/unvote each time you click (up by 1, down by 1)
  • I'm on a fresh install too and commenting out lines 324 and 325 works for me. Thanks for the tip!
  • omg i try to comenting out that lines 324 and 325, it remove the bonk but when i try too vote, i can vote more than one time, i can vote as many as i want, how to fix that??
  • sahotataransahotataran Developer, Bay Area - CA ✭✭✭
    if you are Admin or moderator you can always vote more than once

    Theme Charcha for great desktop and mobile experience! - drop me a message :)

Sign In or Register to comment.