1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Error When Permanently Deleting Threads

Discussion in 'Resolved Bug Reports' started by latimer, Oct 6, 2011.

  1. latimer

    latimer Active Member

    When attempting to permanently delete a thread using the delete link on the first post under 1.1.0 beta 1 I am getting an error. I've tried on different forum nodes, as well as on a clean install of the forum. At the top of the page before any of the html output it says
    <div>fetch forum 2</div>
    And this is the actual error text:
    Undefined index: node_id
    XenForo_Application::handlePhpError() in XenForo/DataWriter/Discussion/Thread.php at line 388
    XenForo_DataWriter_Discussion_Thread::setForumCacheItem() in XenForo/DataWriter/DiscussionMessage/Post.php at line 145
    XenForo_DataWriter_DiscussionMessage_Post->setExtraData() in XenForo/DataWriter/DiscussionMessage/Post.php at line 163
    XenForo_DataWriter_DiscussionMessage_Post->_forumCountsMessages() in XenForo/DataWriter/DiscussionMessage/Post.php at line 131
    XenForo_DataWriter_DiscussionMessage_Post->_updateUserMessageCount() in XenForo/DataWriter/DiscussionMessage.php at line 734
    XenForo_DataWriter_DiscussionMessage->_postDelete() in XenForo/DataWriter.php at line 1716
    XenForo_DataWriter->delete() in XenForo/Model/Post.php at line 1013
    XenForo_Model_Post->deletePost() in XenForo/ControllerPublic/Post.php at line 251
    XenForo_ControllerPublic_Post->actionDelete() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home/mango/public_html/index.php at line 13
  2. ragtek

    ragtek Guest

    You're deleting an post, not a thread!

    XenForo_Model_Post->deletePost() in XenForo/ControllerPublic/Post.php at line 251 XenForo_ControllerPublic_Post->actionDelete() in XenForo/FrontController.php at line 310
    /************** */

         * Deletes an existing post.
         * @return XenForo_ControllerResponse_Abstract
    public function actionDelete()
    2. it seems that they've forgotten some debug code
    public static function getForumCacheItem($forumId)
            if (!
    "<div>fetch forum $forumId</div>";

    but i'm sure that's not causing your bug
  3. latimer

    latimer Active Member

    Sorry you're right. This is when a thread is deleted by using the delete button on the first post, not using the moderation overlay menu in the forum view.
  4. ragtek

    ragtek Guest

    Confirmed, when somebody tries to hard delete the first post you'll get the error
  5. ragtek

    ragtek Guest

    The problem is somewhere in
    protected function _forumCountsMessages()
            if (!
    $forum $this->getExtraData(self::DATA_FORUM))
    $forum $this->getModelFromCache('XenForo_Model_Forum')->getForumByThreadId($this->get('thread_id'));
    I don't know why(because i didn't look:p) , but getForumByThreadId return ALWAYS a empty array as i tried it now...
    that's why
    sets the empty array and why node_id isn't found
  6. Andy.N

    Andy.N Well-Known Member

    Confirmed on a 1.1 beta 1 forum trying to delete the first post of a thread.
    Using Thread tools -> delete thread works.
  7. Kier

    Kier XenForo Developer Staff Member


Share This Page