[FIXED] Error logged when group is deleted

Brettflan

Active Member
An error seems to be logged in the admin panel every time a group is deleted. In this instance, the group admin deleted the group.
  • ErrorException: Template error: Object of class XF\Mvc\Reply\Error could not be converted to string
  • internal_data/code_cache/templates/l1/s2/public/error.php:13
Stack trace

Code:
#0 internal_data/code_cache/templates/l1/s2/public/error.php(13): XF\Template\Templater->handleTemplateError(4096, 'Object of class...', '/home/webmaster...', 13, Array)
#1 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(Brettflan\SeparateCustomTitle\XF\Template\Templater), Array)
#2 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('error', Array)
#3 src/XF/Mvc/Renderer/Json.php(47): XF\Template\Template->render()
#4 src/XF/Mvc/Dispatcher.php(427): XF\Mvc\Renderer\Json->renderErrors(Array)
#5 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\Error))
#6 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'json')
#7 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#8 src/XF.php(391): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}


Request state

Code:
array(4) {
  ["url"] => string(46) "/index.php?groups/tropical-paradise.253/delete"
  ["referrer"] => string(74) "https://forums.taleworlds.com/index.php?groups/tropical-paradise.253/cover"
  ["_GET"] => array(1) {
    ["groups/tropical-paradise_253/delete"] => string(0) ""
  }
  ["_POST"] => array(5) {
    ["hard_delete"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(45) "/index.php?groups/tropical-paradise.253/cover"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

Even though there's an error, it seems like the group deletion goes through fine. And for reference, the "Brettflan\SeparateCustomTitle" there is an addon I've created and has nothing to do with the error, as it still occurs even with that addon disabled, just with a different addon indicated in that spot instead.
 

Truonglv

♥♥ √εgετα ♥♥
Staff member
Tech Support
Can you give some steps or data specs to reproduce? I have tested but did not have this issue.
 

Brettflan

Active Member
These errors showed up from regular users (the group admin specifically, as mentioned) deleting their own groups. I'll do a bit of testing when I have a chance to see if I can reproduce it myself.
That said, I do see that error pop up on average once a day or so.
 

Brettflan

Active Member
OK, I've tracked it down. I just tested in Social Groups 2.2.0 to be sure it still happens.

When a regular user who is the group creator/admin tries to delete their group, they get the options "Remove from public view" and "Permanently delete". If they choose "Permanently delete", they get an error popup with the title "Oops! We ran into some problems." and no text below that. The error from the first post above is then added to the server log, with just a slightly different request state.

However, if a super moderator with most permissions (who is not the group creator/admin) chooses to "Permanently delete" the same group, it successfully deletes the group without error.
 
Top