[NOT A BUG] TL API - Conflict with TH Reactions Plus Addon

ichpen

Member
Browsing using the app generates thousands of errors for every post that has a Reaction Plus (which is almost everything)......


  • TypeError: Macro public:th_reactplus_verb_phrase_macros :: renderPhrase() error: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class XF\Api\Templater does not have a method "fnThReactPlusReactionVerb"
  • src/XF/Template/Templater.php:1128
  • Generated by: Nik
  • Jul 31, 2022 at 9:34 PM

Stack trace​

#0 internal_data/code_cache/templates/l1/s0/public/th_reactplus_verb_phrase_macros.php(20): XF\Template\Templater->func('th_reactplus_re...', Array, false)
#1 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(XF\Api\Templater), Array, NULL)
#2 internal_data/code_cache/templates/l1/s0/public/alert_post_reaction.php(12): XF\Template\Templater->callMacro('th_reactplus_ve...', 'renderPhrase', Array, Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(XF\Api\Templater), Array, NULL)
#4 src/XF/Alert/AbstractHandler.php(80): XF\Template\Templater->renderTemplate('alert_post_reac...', Array)
#5 src/XF/Entity/UserAlert.php(71): XF\Alert\AbstractHandler->render(Object(ForumApps\API\XF\Entity\UserAlert))
#6 src/addons/Truonglv/Api/XF/Entity/UserAlert.php(35): XF\Entity\UserAlert->render()
#7 src/XF/Mvc/Entity/Entity.php(542): Truonglv\Api\XF\Entity\UserAlert->setupApiResultData(Object(XF\Api\Result\EntityResult), 1, Array)
#8 src/XF/Mvc/Entity/AbstractCollection.php(47): XF\Mvc\Entity\Entity->toApiResult(1, Array)
#9 src/addons/Truonglv/Api/Api/Controller/Notifications.php(35): XF\Mvc\Entity\AbstractCollection->toApiResults()
#10 src/XF/Mvc/Dispatcher.php(352): Truonglv\Api\Api\Controller\Notifications->actionGet(Object(XF\Mvc\ParameterBag))
#11 src/XF/Api/Mvc/Dispatcher.php(27): XF\Mvc\Dispatcher->dispatchClass('Truonglv\\Api:No...', 'Get', Object(XF\Api\Mvc\RouteMatch), Object(Truonglv\Api\Api\Controller\Notifications), NULL)
#12 src/XF/Mvc/Dispatcher.php(115): XF\Api\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Api\Mvc\RouteMatch), Object(Truonglv\Api\Api\Controller\Notifications), NULL)
#13 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Api\Mvc\RouteMatch))
#14 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#15 src/XF.php(524): XF\App->run()
#16 index.php(16): XF::runApp('XF\\Api\\App')
#17 {main}

Request state​

array(4) {
["url"] => string(34) "/api/tapi-app-notifications?page=1"
["referrer"] => bool(false)
["_GET"] => array(2) {
["/api/tapi-app-notifications"] => string(0) ""
["page"] => string(1) "1"
}
["_POST"] => array(0) {
}
}
 

Truonglv

♥♥ √εgετα ♥♥
Staff member
Tech Support
I guess that add-on only register their callbacks at public app. It's should be fixed if they register it in api too.
 
Top