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.

Vanilla 1.1 : Error with latest vanilla

andruandru New
edited March 2013 in Vanilla 2.0 - 2.8

Hi, I'm getting this error when Kudos is enabled with the latest vanilla (git master)...

DiscussionController->Options not found. (line 54 of class.discussioncontroller.php)

if I dig a bit deeper I get to:

Object of class Gdn_DataSet could not be converted to string (line 309 of Kudos/default.php)

308: public function DiscussionController_CommentOptions_Handler(&$Sender) {
309: $Sender->Options .= '';
310: $Sender->Options .= $this->FormatKudos($Sender->EventArguments['Object']->DiscussionID, $Sender->EventArguments['Object']->CommentID);
311: $Sender->Options .= '
';
312: }

Looks like where $Sender->Options used to be a string, it has been changed to an instance of Gdn_DataSet. I'm piled under right now and don't have time to investigate further, so I've just disabled Kudos. Is the plugin still under active development? I may have time to submit a patch in the coming weeks if nobody else can catch it.

Andru

Comments

  • I'm getting an error trying to edit the above post to fix up that code block, so here it is:

    308: public function DiscussionController_CommentOptions_Handler(&$Sender) {
    309: $Sender->Options .= '';
    310: $Sender->Options .= $this->FormatKudos($Sender->EventArguments['Object']->DiscussionID, $Sender->EventArguments['Object']->CommentID);
    311: $Sender->Options .= '
    ';
    312: }

  • Well, disabling Kudos didn't help - when one of my visitors loads the forum Kudos somehow re-enables itself.

    So, I made the following change. With this change Kudos is still broken (it doesn't display anything) but at least it doesn't bring the whole discussion down with it.

    I'm attaching a git diff file for this fix (with a .txt extension since this forum doesn't let me upload a .diff). If there is a git repo I can push this change to let me know and I can do so.

  • did you ever get it figured out?

  • replace all the &$Sender with $Sender in the plugin should work with vanilla 2.1

    should fix most plugins that don't work in vanilla 2.1

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited August 2012

    it seems there is more than that just the above changes to fix, as was pointed out earlier.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I so want this to work with 2.1

  • @yusf said:
    I so want this to work with 2.1

    WTF?

    I so want ppl to read the entire thread, including this comment:

    @peregrine said:
    replace all the &$Sender with $Sender in the plugin should work with vanilla 2.1

    should fix most plugins that don't work in vanilla 2.1

    Then execute those steps & report if it works for them.

    There was an error rendering this rich post.

  • hgtonighthgtonight ∞ · New Moderator
    edited March 2013

    @peregrine said:
    it seems there is more than that just the above changes to fix, as was pointed out earlier.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • GaryFunkGaryFunk Senior Application Developer ✭✭

    I want people to start using version IDs. This discussion should be closed.

  • @UnderDog No reason to be rude, I merely read what @peregrine had already stated and made my verdict. For the record I also recreated all mentioned steps regarding code changes as well.

  • You made a verdict? Really? First I would open my own topic next time, next in your opening post you should state that you executed peregrine's steps
    last: do a lil' debugging & while you do that, read rhe posts on forum etiquette.
    you probably concluded too soon, something like 'I already done that' it happens all the time

    There was an error rendering this rich post.

  • GaryFunkGaryFunk Senior Application Developer ✭✭

    Now can we close this, or at least change the title to 1.1 does not work.

  • No comprende, kudos version is 3.0 what does the 1.1 part mean? Can you tell me the exact title you like?

    There was an error rendering this rich post.

  • GaryFunkGaryFunk Senior Application Developer ✭✭

    Vanilla 1.1. The OP failed to tell us which 'latest vanilla' she was talking about.

This discussion has been closed.