Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

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

dlefflerdleffler New
edited September 2011 in Vanilla 2.0 - 2.8
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)
  • 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!
  • 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

    There was an error rendering this rich post.

Sign In or Register to comment.