Tickets Not a Bug Convert Thread to Ticket

MattW

Member
Hi Nix,

Just tried to convert a thread to a ticket, my own account on the forum (admin), and basic user in "customer" group.

Throws the below error

Code:
LogicException: Replier can only add messages at the end of a ticket in src/addons/NF/Tickets/Service/Ticket/Replier.php at line 271
NF\Tickets\Service\Ticket\Replier->setMessagePosition() in src/addons/NF/Tickets/Service/Ticket/Replier.php at line 249
NF\Tickets\Service\Ticket\Replier->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
NF\Tickets\Service\Ticket\Replier->save() in src/addons/NF/Tickets/Service/Ticket/ThreadConverter.php at line 131
NF\Tickets\Service\Ticket\ThreadConverter->NF\Tickets\Service\Ticket\{closure}() in src/XF.php at line 479
XF::asVisitor() in src/addons/NF/Tickets/Service/Ticket/ThreadConverter.php at line 148
NF\Tickets\Service\Ticket\ThreadConverter->addReply() in src/addons/NF/Tickets/Service/Ticket/ThreadConverter.php at line 105
NF\Tickets\Service\Ticket\ThreadConverter->addReplies() in src/addons/NF/Tickets/Service/Ticket/ThreadConverter.php at line 84
NF\Tickets\Service\Ticket\ThreadConverter->_save() in src/XF/Service/ValidateAndSavableTrait.php at line 40
NF\Tickets\Service\Ticket\ThreadConverter->save() in src/addons/NF/Tickets/XF/Pub/Controller/Thread.php at line 47
NF\Tickets\XF\Pub\Controller\Thread->actionConvertToTicket() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2190
XF\App->run() in src/XF.php at line 391
XF::runApp() in index.php at line 20
 
Weird question but how was the thread initially created? The error is thrown when the last post information stored for the thread is not the same as the actual last post in that thread.
 
Good question. It's a thread from back in 2017, and I can't actually remember how it was created. It was a testing thread.

Let me create a new thread as that user again, and see if it does the same thing.
 
I'll chalk this up as "Not a bug" but I'd recommend going to Admin -> Tools -> Rebuild caches and then rebuilding threads. That'll rebuild first and last post metadata for threads since at least one had bad data.
 
I'll chalk this up as "Not a bug" but I'd recommend going to Admin -> Tools -> Rebuild caches and then rebuilding threads. That'll rebuild first and last post metadata for threads since at least one had bad data.
Just given that a go, and it's still doing the same. Not an issue though, as it was a test thread anyway, so will just see how it goes :)
 
Back
Top