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

Not a bug Thread container data writer custom not fired

truonglv

Formerly Nobita.Kun
#1
Hi.

I have seen that thread container datawriter alway return XenForo_DataWriter_Forum although I have used another node data writer class.

I have created an node_type and have an data writer. While creating thread I use my node_id which have custom container data writer. But my writer not fired when thread saved.

I think the bug comming from:
PHP:
public function getContainerDataWriter($containerId, $errorHandler)
    {
        $dw = XenForo_DataWriter::create('XenForo_DataWriter_Forum', $errorHandler);
        $dw->setExistingData($containerId);
        return $dw;
    }
 

Mike

XenForo developer
Staff member
#2
Threads can only exist in forums out of the box. If you're doing something else, you'll need to handle the custom cases.

You'll actually be violating some pretty low level assumptions so I expect that may cause further problems. I'd probably advise you to consider a different approach.
 

truonglv

Formerly Nobita.Kun
#3
Threads can only exist in forums out of the box. If you're doing something else, you'll need to handle the custom cases.

You'll actually be violating some pretty low level assumptions so I expect that may cause further problems. I'd probably advise you to consider a different approach.
I see. Now I have change to use default way for that :)