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

Extending thread leaves blank entries in Recent Activity

Discussion in 'XenForo Development Discussions' started by arms, Mar 21, 2014.

  1. arms

    arms Active Member

    All seems to work fine. Extra fields are filled in etc. But now finding I'm getting empty recent activity entries.


    I'm extending actionCreateThread and actionAddThread.

    Could it be to do with the extra save in:

            function actionAddThread()
    $suffixId $this->_input->filterSingle('suffix_id'XenForo_Input::UINT);
    $forumId $this->_input->filterSingle('node_id'XenForo_Input::UINT);
    $ftpHelper $this->getHelper('ForumThreadPost');
    $forum $ftpHelper->assertForumValidAndViewable($forumId $forumId $forumName);          
    $parent parent::actionAddThread();
    $threadId $parent->params['thread']['thread_id'];
                if (!
    $suffixId 0// not usable, just blank it out
    $dw XenForo_DataWriter::create('XenForo_DataWriter_Discussion_Thread');
                if (
    $forum['require_suffix'] && !$dw->get('suffix_id'))
    $dw->error(new XenForo_Phrase('please_select_a_suffix'), 'suffix_id');
    Any help would be appreciated.
    Last edited: Mar 21, 2014
  2. arms

    arms Active Member


    After investigating, my methods seem flawed.

    It looks like what I should be doing is using _preSave and _postSave in the datawriter.

    Should I also be moving this to actionValidateField
    if ($forum['require_suffix'] && !$dw->get('suffix_id'))
    $dw->error(new XenForo_Phrase('please_select_a_suffix'), 'suffix_id');

Share This Page