1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Fixed Error removing comments

Discussion in 'Showcase Resolved Bug Reports' started by C.Birch, Nov 10, 2012.

  1. C.Birch

    C.Birch Member AMS Premium SC Premium UBS Premium

    When trying to remove an comment i get the following error.
    Code:
    Server Error
     
    Argument 1 passed to NFLJ_Showcase_Model_Comment::canDeleteComment() must be an array, none given, called in /var/www/vhosts/****/public_html/library/NFLJ/Showcase/ControllerPublic/Comment.php on line 109 and defined
     
        XenForo_Application::handlePhpError() in NFLJ/Showcase/Model/Comment.php at line 246
        NFLJ_Showcase_Model_Comment->canDeleteComment() in NFLJ/Showcase/ControllerPublic/Comment.php at line 109
        NFLJ_Showcase_ControllerPublic_Comment->actionDelete() in XenForo/FrontController.php at line 310
        XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
        XenForo_FrontController->run() in /var/www/vhosts/****/public_html/index.php at line 13
    
     
  2. Bob

    Bob Developer Staff Member

    Whoops.. thats my bad. Right before I released I had changed permissions checking. For a quick fix..

    edit the file: /library/NFLJ/Showcase/ControllerPublic/Comment.php

    on Line 109 find:
    PHP:
            if ($this->isConfirmedPost() && $scCommentModel->canDeleteComment())
    replace with:
    PHP:
            if ($this->isConfirmedPost() && $scCommentModel->canDeleteComment($comment))
     
    C.Birch likes this.
  3. Bob

    Bob Developer Staff Member

    btw, if you are not comfortable with making a file edit, just let me know and I can inbox you a file that you can just replace :)
     
  4. C.Birch

    C.Birch Member AMS Premium SC Premium UBS Premium

    All fixed thanks :)
     
    Bob likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.