Brettflan
Active Member
Testing out the XenForo 2.2.16 update (Patch 2 version), one of the security changes they've made is triggering at least one serious error in this addon. There may be more, I've just run across one through brief testing.
Trying to view the Event Calendar, it now fails to load, with this error in the server log:
After seeing how this same sort of compatibility problem was addressed in another addon (Andrew's Moderator Panel addon), I was able to make a workaround fix for this one instance by editing "addons\Truonglv\Groups\Pub\Controller\GroupAction.php" and simply changing line 715 from:
to:
There's a strong possibility there are further View calls that also need to be updated, this was just a quick skim through and workaround for the one I found off the top.
Truonglv
Trying to view the Event Calendar, it now fails to load, with this error in the server log:
Code:
InvalidArgumentException: Class group-actions\Events does not match formatter pattern %s\%s\View\%s src/XF.php:1129
Stack trace
#0 src/XF/App.php(1667): XF::stringToClass('group-actions\\E...', '%s\\%s\\View\\%s', 'Pub')
#1 src/XF/Container.php(234): XF\App->XF\{closure}('group-actions\\E...', Array, Object(XF\Container))
#2 src/XF/Container.php(247): XF\Container->create('view', 'group-actions\\E...', Array)
#3 src/XF/Mvc/Renderer/AbstractRenderer.php(80): XF\Container->XF\{closure}('group-actions\\E...', Array)
#4 src/XF/Mvc/Renderer/AbstractRenderer.php(87): XF\Mvc\Renderer\AbstractRenderer->createViewObject('group-actions\\E...', 'public:tlg_brow...', Array)
#5 src/XF/Mvc/Renderer/Html.php(47): XF\Mvc\Renderer\AbstractRenderer->renderViewObject('group-actions\\E...', 'public:tlg_brow...', Array)
#6 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('group-actions\\E...', 'public:tlg_brow...', Array)
#7 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#10 src/XF/App.php(2485): XF\Mvc\Dispatcher->run()
#11 src/XF.php(524): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
["url"] => string(41) "/test-site/index.php?group-actions/events"
["referrer"] => string(69) "https://forums.taleworlds.com/test-site/index.php?group-actions/feeds"
["_GET"] => array(1) {
["group-actions/events"] => string(0) ""
}
["_POST"] => array(0) {
}
}
After seeing how this same sort of compatibility problem was addressed in another addon (Andrew's Moderator Panel addon), I was able to make a workaround fix for this one instance by editing "addons\Truonglv\Groups\Pub\Controller\GroupAction.php" and simply changing line 715 from:
Code:
$this->getLinkPrefix() . '\\Events',
Code:
$this->getLinkPrefix() . '\\Events:View',
There's a strong possibility there are further View calls that also need to be updated, this was just a quick skim through and workaround for the one I found off the top.
Truonglv