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.

Members can't see Reply link

edited February 2011 in Vanilla 2.0 - 2.8
Hi, I'm sure I'm missing something, but I've installed the ReplyTo plugin, and I can see the Reply link next to each comment under my login as administrator, but no members can see it. I've tried to go into the User roles, but I don't see any specific settings for ReplyTo for Members. Help?

Comments

  • edited February 2011
    I'm having the same problem.. Any idea how to solve this ?

    *edit: I've hacked the class.replyto.plugin.php a bit.

    At line 262 i've removed

    && $Session->CheckPermission('Vanilla.Comments.Add', TRUE, 'Category', $CategoryID)

    Everybody who's logged in can see the link now. That's no problem in my case :-)

    Somehow there is a bug in that line. Every category that doesn't have "This category has custom permissions." checked, does return false to that permision check.
  • Hey thanks, GateKeaper. That took care of it for me. For me, it was line 627 in that file, but same content.

    Thanks again for posting.
  • edited February 2011
    Hmmm.. I'm sorry, my members get a "{"Code":401,"Exception":"You don't have permission to do that."}" message when they click on the link now. So it ain't helping that much.

    I found the following code in an template file, is it something with the difference between those checks? The ReplyTo script is checking at CategoryID while the other script is checking PermissionCategoryID

    $PermissionCategoryID = GetValue('PermissionCategoryID', $Object, GetValue('PermissionCategoryID', $Sender->Discussion)); $Session->CheckPermission('Vanilla.Discussions.Add', TRUE, 'Category', $PermissionCategoryID))

    Don't know if that's the thing.. But why does the one checks permissions at category id, and the other gets PermissionCategoryID first.

    Also, i found this one:
    30 /* 31 Caused non-root users to not be able to add comments. Must take categories 32 into account. Look at CheckPermission for more information. 33 if (!$Session->CheckPermission('Vanilla.Comment.Add')) { 34 $CommentOptions['Disabled'] = 'disabled'; 35 $CommentOptions['Value'] = T('You do not have permission to write new comments.'); 36 } 37 */
    @ http://phpkode.com/source/p/vanilla-forum/vanilla/applications/vanilla/views/post/comment.php

    So there definitely is something wrong with the line in my previous post.
  • Hmmm, I guess we still need help then. Nice try! :) Anyone else? Or is there a better plugin? This is an important feature to be able to do conversations in threads, etc. I'm trying to replace a Facebook group with this, and it's always nice to be able to comment directly under someone else's post, especially in a support, help kind of function.
  • Which version of Vanilla are you using? I am guessing the changes to the categories has affected the way the permissions work in the latest version, but I have not tested against that. Are the permissions now hierarchical, along with the categories themselves?
  • Version 2.0.17.8, but I'm not sure of the answer to your question above.
  • judgejjudgej
    edited February 2011
    Cheers - I'll do some digging and find out.
  • edited September 2012

    I don't know, how it affects to specific categories settings but it work in simple variant.

    In file plugins/ReplyTo/class.replyto.plugin.php in function AddReplyToButton try to replace lines
    -- && $Session->CheckPermission('Vanilla.Comments.Add', TRUE, 'Category', $CategoryID)
    ++ && $Session->CheckPermission('Vanilla.Comments.Add')

  • Yeee! I found the problem!

    In file plugins/ReplyTo/class.replyto.plugin.php in function AddReplyToButton replace lines

    if (isset($Sender->Discussion->PermissionCategoryID)) { $CategoryID = $Sender->Discussion->CategoryPermissionID;

    replace

    if (isset($Sender->Discussion->PermissionCategoryID)) { $CategoryID = $Sender->Discussion->PermissionCategoryID;

  • Thanks :-)

    I have added this correction to the master branch here:

    https://github.com/judgej/Vanilla-ReplyTo-Plugin/tree/master/ReplyTo

    I haven't tested it or made a release yet, but if anyone would like to test it, I'll package up a new version.

    -- Jason

  • @JasonJudge said:
    Thanks :-)

    I have added this correction to the master branch here:

    https://github.com/judgej/Vanilla-ReplyTo-Plugin/tree/master/ReplyTo

    I haven't tested it or made a release yet, but if anyone would like to test it, I'll package up a new version.

    -- Jason

    I tried your version from the master branch but couldn't even get it to enable on Vanilla 2.0 (latest stable release).

    -k0nsl

  • Someone managed to make this work?
    I'd like to use the plugin but for me it doesn't work.

  • follow the instructions carefully.

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

  • @Neoveneficus said:
    Yeee! I found the problem!

    In file plugins/ReplyTo/class.replyto.plugin.php in function AddReplyToButton replace lines

    if (isset($Sender->Discussion->PermissionCategoryID)) { $CategoryID = $Sender->Discussion->CategoryPermissionID;

    replace

    if (isset($Sender->Discussion->PermissionCategoryID)) { $CategoryID = $Sender->Discussion->PermissionCategoryID;

    Do you still use this plugin? Becouse it doesn't work now...

  • peregrineperegrine MVP
    edited April 2013

    it works perfectly if you follow the instructions.

    if the above help didn't work for you

    try this:

    http://vanillaforums.org/discussion/comment/154400/#Comment_154400

    and this

    http://vanillaforums.org/discussion/comment/154402/#Comment_154402

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

  • dipandipan New
    edited November 2014

    Hi Everyone

    I am not able to get going with above all instruction. I followed all instruction carefully but it still didnt work.
    I am getting below error

    Fatal Error in DiscussionController.__get();
    DiscussionController->Options not found.
    The error occurred on or near: E:\xampp\htdocs\vanilla\applications\vanilla\controllers\class.discussioncontroller.php
    
    40:             Deprecated('DiscussionController->CommentData', "DiscussionController->Data('Comments')");
    41:             return $this->Data('Comments');
    42:             break;
    43:       }
    44:       throw new Exception("DiscussionController->$Name not found.", 400);
    45:    }
    46: 
    47:    /**
    48:     * Default single discussion display.
    
    Backtrace:
    [E:\xampp\htdocs\vanilla\plugins\ReplyTo\class.replyto.plugin.php:661] DiscussionController->__get();
    [E:\xampp\htdocs\vanilla\plugins\ReplyTo\class.replyto.plugin.php:636] ReplyTo->AddReplyToButton();
    [E:\xampp\htdocs\vanilla\library\core\class.pluginmanager.php:705] ReplyTo->DiscussionController_CommentOptions_Handler();
    [E:\xampp\htdocs\vanilla\library\core\class.pluginmanager.php:638] Gdn_PluginManager->CallEventHandler();
    [E:\xampp\htdocs\vanilla\library\core\class.pluggable.php:144] Gdn_PluginManager->CallEventHandlers();
    

    Please help me out for this.
    Thanks in advance.

  • @dipan said:
    Hi Everyone

    I am not able to get going with above all instruction. I followed all instruction carefully but it still didnt work.
    I am getting below error

    Fatal Error in DiscussionController.__get();
    DiscussionController->Options not found.
    The error occurred on or near: E:\xampp\htdocs\vanilla\applications\vanilla\controllers\class.discussioncontroller.php
    
    40:             Deprecated('DiscussionController->CommentData', "DiscussionController->Data('Comments')");
    41:             return $this->Data('Comments');
    42:             break;
    43:       }
    44:       throw new Exception("DiscussionController->$Name not found.", 400);
    45:    }
    46: 
    47:    /**
    48:     * Default single discussion display.
    
    Backtrace:
    [E:\xampp\htdocs\vanilla\plugins\ReplyTo\class.replyto.plugin.php:661] DiscussionController->__get();
    [E:\xampp\htdocs\vanilla\plugins\ReplyTo\class.replyto.plugin.php:636] ReplyTo->AddReplyToButton();
    [E:\xampp\htdocs\vanilla\library\core\class.pluginmanager.php:705] ReplyTo->DiscussionController_CommentOptions_Handler();
    [E:\xampp\htdocs\vanilla\library\core\class.pluginmanager.php:638] Gdn_PluginManager->CallEventHandler();
    

    [E:\xampp\htdocs\vanilla\library\core\class.pluggable.php:144] Gdn_PluginManager->CallEventHandlers();


    Please help me out for this.
    Thanks in advance.

    what version of vanilla are you using? if you are using 2.1.x, see

    http://vanillaforums.org/discussion/comment/218124/#Comment_218124

    and

    http://vanillaforums.org/discussion/26703/plugins-themes-that-work-and-don-t-work-in-vanilla-2-1/p1

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

Sign In or Register to comment.