- Affected version
- 2.0.2
In XF\Pub\Controller\Post::actionEdit() setupPostEdit and setupFirstPostThreadEdit do not communicate, and thus don't share the same transaction.
This means post changes can be saved but thread changes fail to save (for whatever reason).
Worse, however is the Thread editor code path starting here;
In the class XF\Service\Thread\Editor
This call chain from $threadEditor->save(); does not setup a transaction! Initial checks show this applies to other call sites for Thread\Editor.
Note; It is fairly yuck at pushing Thread generated in setupPostEdit with the threadEditor that is sometimes floating around that code path.
This means post changes can be saved but thread changes fail to save (for whatever reason).
Worse, however is the Thread editor code path starting here;
Code:
$editor->save();
if ($threadEditor)
{
$threadEditor->save();
}
In the class XF\Service\Thread\Editor
Code:
protected function _save()
{
$thread = $this->thread;
$thread->save(true, false);
return $thread;
}
This call chain from $threadEditor->save(); does not setup a transaction! Initial checks show this applies to other call sites for Thread\Editor.
Note; It is fairly yuck at pushing Thread generated in setupPostEdit with the threadEditor that is sometimes floating around that code path.