Please upgrade here. These earlier versions are no longer being updated and have security issues.

Little help with Kudos?

This discussion is related to the Kudos Plugin addon.
BDHarrington7BDHarrington7 New New
edited February 2015 in Vanilla 2.0 - 2.8

So this plugin hasn't been maintained in years, and subsequently broke in 2.1 somewhere. I upgraded from 2.0.18 to 2.1.8p2, and the Kudos plugin (the only one of it's kind on this platform, amazingly) crashes when you view a thread. It crashes here:

23 Feb 2015 - 00:30:00 dev.cwak.us Garden Exception: DiscussionController->Options not found. in /var/www/kristy/applications/vanilla/controllers/class.discussioncontroller.php on 4423 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#0 /var/www/kristy/plugins/Kudos/default.php(320): DiscussionController->__get('Options')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#1 /var/www/kristy/library/core/class.pluginmanager.php(705): KudosPlugin->DiscussionController_CommentOptions_Handler(Object(DiscussionController), Array, 'discussioncontr...')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#2 /var/www/kristy/library/core/class.pluginmanager.php(638): Gdn_PluginManager->CallEventHandler(Object(DiscussionController), 'DiscussionContr...', 'CommentOptions', 'Handler')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#3 /var/www/kristy/library/core/class.pluggable.php(144): Gdn_PluginManager->CallEventHandlers(Object(DiscussionController), 'DiscussionContr...', 'CommentOptions')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#4 /var/www/kristy/applications/vanilla/views/discussion/helper_functions.php(334): Gdn_Pluggable->FireEvent('CommentOptions')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#5 /var/www/kristy/applications/vanilla/views/discussion/helper_functions.php(351): GetCommentOptions(Object(stdClass))23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#6 /var/www/kristy/applications/vanilla/views/discussion/helper_functions.php(88): WriteCommentOptions(Object(stdClass))23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#7 /var/www/kristy/applications/vanilla/views/discussion/comments.php(19): WriteComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 1)23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#8 /var/www/kristy/applications/vanilla/views/discussion/index.php(52): include('/var/www/kristy...')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#9 /var/www/kristy/library/core/class.controller.php(779): include('/var/www/kristy...')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#10 /var/www/kristy/library/core/class.controller.php(1245): Gdn_Controller->FetchView('', false, false)23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#11 /var/www/kristy/library/core/class.pluggable.php(210): Gdn_Controller->xRender()23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#12 /var/www/kristy/applications/vanilla/controllers/class.discussioncontroller.php(234): Gdn_Pluggable->__call('Render', Array)23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#13 /var/www/kristy/applications/vanilla/controllers/class.discussioncontroller.php(234): DiscussionController->Render()23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#14 [internal function]: DiscussionController->Index('211', 'kristy-s-new-wo...', '')23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#15 /var/www/kristy/library/core/class.dispatcher.php(350): call_user_func_array(Array, Array)23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#16 /var/www/kristy/index.php(46): Gdn_Dispatcher->Dispatch()23 Feb 2015 - 00:30:00 dev.cwak.us Garden   
#17 {main}

Here's the code it crashes on (line 2):

public function DiscussionController_CommentOptions_Handler($Sender) {
    $Sender->Options .= '';
    $Sender->Options .= $this->FormatKudos($Sender->EventArguments['Object']->DiscussionID, $Sender->EventArguments['Object']->CommentID);
    $Sender->Options .= '';
  }

I've looked through the plugin documentation, trying to figure out where the options field went, (some of which doesn't seem to have been updated since 2011), and I'm debugging the application to see if there's a comparable field to add this information to. Basically I'm just looking for the place to put these comment options code blocks.

Tagged:

Comments

Sign In or Register to comment.