XF\Service\Thread\Editor does not use database transactions

Affected version


Well-known member
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;

if ($threadEditor)
In the class XF\Service\Thread\Editor
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.