Fork me on GitHub
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.
Critical: Update to 2.1.8, released 15 Jan.

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

dlefflerdleffler New
edited September 2011 in Vanilla 2.0 Help
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.

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!


  • 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 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 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

    ->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, 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.