aurorahHarmony
Member
- Affected version
- 2.3.6
I have a webhook enabled that is set to only run on post insert, however when this webhook is enabled, liking a post creates this error:
I have tried adding other triggers within the post triggers and the same issue occurs. This does not occur for other trigger types (thread etc)

Here are the available reactions on our forum. There is only one enabled (enabling more does not fix the issue):

Update: This issue only seems to occur on posts with attached images. Functions such as the delete function also stop working on these posts
Code:
TypeError: XF\Mvc\Entity\AbstractCollection::toWebhookResults(): Argument #1 ($options) must be of type array, int given, called in /var/www/vhosts/xenforo/src/XF/Api/Result/EntityResult.php on line 226 src/XF/Mvc/Entity/AbstractCollection.php:72
Code:
#0 src/XF/Api/Result/EntityResult.php(226): XF\Mvc\Entity\AbstractCollection->toWebhookResults(1, Array)
#1 src/XF/Api/Result/EntityResult.php(174): XF\Api\Result\EntityResult->castToFinalValue(Object(XF\Mvc\Entity\ArrayCollection), 1, Array)
#2 src/XF/Repository/WebhookRepository.php(113): XF\Api\Result\EntityResult->render()
#3 src/XF/Behavior/Webhook.php(34): XF\Repository\WebhookRepository->queueWebhook('post', 33, 'update', Object(XFES\XF\Entity\Post))
#4 src/XF/Mvc/Entity/Entity.php(1327): XF\Behavior\Webhook->postSave()
#5 src/XF/Reaction/AbstractHandler.php(171): XF\Mvc\Entity\Entity->save()
#6 src/XF/Repository/ReactionRepository.php(287): XF\Reaction\AbstractHandler->updateContentReactions(Object(XFES\XF\Entity\Post), Array, Array)
#7 src/XF/Entity/ReactionContent.php(224): XF\Repository\ReactionRepository->rebuildContentReactionCache('post', 33, false, false)
#8 src/XF/Entity/ReactionContent.php(162): XF\Entity\ReactionContent->rebuildContentReactionCache()
#9 src/XF/Mvc/Entity/Entity.php(1324): XF\Entity\ReactionContent->_postSave()
#10 src/XF/Repository/ReactionRepository.php(202): XF\Mvc\Entity\Entity->save()
#11 src/XF/Repository/ReactionRepository.php(149): XF\Repository\ReactionRepository->insertReaction(1, 'post', 33, Object(XenAddons\UBS\XF\Entity\User), true, false)
#12 src/XF/ControllerPlugin/ReactionPlugin.php(68): XF\Repository\ReactionRepository->reactToContent(1, 'post', 33, Object(XenAddons\UBS\XF\Entity\User), true)
#13 src/XF/ControllerPlugin/ReactionPlugin.php(27): XF\ControllerPlugin\ReactionPlugin->actionToggleReaction(Object(XFES\XF\Entity\Post), 'posts/reactions', 'posts')
#14 src/XF/ControllerPlugin/ReactionPlugin.php(20): XF\ControllerPlugin\ReactionPlugin->actionReact(Object(XFES\XF\Entity\Post), 'posts', 'posts/react', 'posts/reactions')
#15 src/XF/Pub/Controller/PostController.php(416): XF\ControllerPlugin\ReactionPlugin->actionReactSimple(Object(XFES\XF\Entity\Post), 'posts')
#16 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\PostController->actionReact(Object(XF\Mvc\ParameterBag))
#17 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'React', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\PostController), NULL)
#18 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\PostController), NULL)
#19 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#20 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#21 src/XF.php(806): XF\App->run()
#22 index.php(23): XF::runApp('XF\\Pub\\App')
#23 {main}
I have tried adding other triggers within the post triggers and the same issue occurs. This does not occur for other trigger types (thread etc)

Here are the available reactions on our forum. There is only one enabled (enabling more does not fix the issue):

Update: This issue only seems to occur on posts with attached images. Functions such as the delete function also stop working on these posts
Last edited: