[FIXED] XF 2.2.16 compatibility problem

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:
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',
to:
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
 
I'll also add, the same error occurs with just the manual patch they outline in the release post, not specifically the full 2.2.16 update.


And you can see the new security code that's actually triggering the above error in that post, in their provided edit to XF.php.
 
Last edited:
It would really be nice to get some responses on these issues that have cropped up, especially with the latest fix that XenForo pushed out pretty much killing certain aspects of this add-on.
As bad as I hate to say it (and I extended the license on this add-on not long ago) I'm looking at alternatives.
 
These errors are continuing, and are showing up multiple times a day.
Any update or ETA on a fix for it?
We are a week in and no word of if it has even been looked at?
 
Looks like Truonglv was last online two weeks ago, and hasn't been on his site here since. Probably not the XF forums either. It is somewhat troubling.
 
For what it's worth, I haven't run into other errors after the workaround fix above. But I'm not actually running the very latest version of this addon, I'm a few releases behind, though I did check that the problem and fix above also applies directly to the latest version as well before I posted it.
 
Back
Top