Social Groups for XenForo

Social Groups for XenForo [Paid] 2.1.33 Patch Level 6

No permission to buy ($49.00)
Got two errors showing in development setup:

I deleted a forum which had a test thread in it.

Code:
Server error log
[LIST]
[*]ErrorException: [E_NOTICE] Undefined index: deleteOwnPost
[*] 
[*]src/addons/Snog/Groups/Pub/Controller/Discussion.php:396
[*]Generated by: user3
[*] 
[*]Feb 18, 2018 at 8:57 AM
[/LIST]
Stack trace
#0 src/addons/Snog/Groups/Pub/Controller/Discussion.php(396): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/myptsd...', 396, Array)
#1 src/XF/Mvc/Dispatcher.php(249): Snog\Groups\Pub\Controller\Discussion->actionDeletePost(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(87): XF\Mvc\Dispatcher->dispatchClass('Snog\\Groups:Dis...', 'Deletepost', 'json', Object(XF\Mvc\ParameterBag), 'snogGroups', Object(Snog\Groups\Pub\Controller\Discussion), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}
Request state
array(4) {
  ["url"] => string(251) "/group_discussions/dissociative-identity-disorder-did.1/deletepost?id=1&_xfRequestUri=%2Fgroup_discussions%2Fdissociative-identity-disorder-did.1%2Fview%3Fid%3D1&_xfWithData=1&_xfToken=1518904659%2Ce5b7766ab75ffc549997f72e6dc02b2e&_xfResponseType=json"
  ["referrer"] => string(89) "https://www.ptsdnews.com/group_discussions/dissociative-identity-disorder-did.1/view?id=1"
  ["_GET"] => array(6) {
    ["/group_discussions/dissociative-identity-disorder-did_1/deletepost"] => string(0) ""
    ["id"] => string(1) "1"
    ["_xfRequestUri"] => string(65) "/group_discussions/dissociative-identity-disorder-did.1/view?id=1"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1518904659,e5b7766ab75ffc549997f72e6dc02b2e"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}

Code:
Server error log
[LIST]
[*]ErrorException: Template error: Macro public:snog_groups_post_macros:photo_post is unknown
[*] 
[*]src/XF/Template/Templater.php:554
[*]Generated by: [URL='https://www.ptsdnews.com/admin.php?users/user2.45895/edit']user2[/URL]
[*] 
[*]Feb 18, 2018 at 8:59 AM
[/LIST]
[SIZE=5][B]Stack trace[/B][/SIZE]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Macro public:sn...', '/var/www/myptsd...', 554, Array)
#1 src/XF/Template/Templater.php(554): trigger_error('Macro public:sn...', 512)
#2 src/XF/Template/Templater.php(658): XF\Template\Templater->getTemplateMacro('public', 'snog_groups_pos...', 'photo_post')
#3 internal_data/code_cache/templates/l1/s85/public/snog_groups_post_edited.php(10): XF\Template\Templater->callMacro('snog_groups_pos...', 'photo_post', Array, Array)
#4 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#5 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('snog_groups_pos...', Array)
#6 src/XF/Mvc/Renderer/Json.php(81): XF\Template\Template->render()
#7 src/XF/Mvc/Renderer/Json.php(65): XF\Mvc\Renderer\Json->renderHtmlFallback('Snog\\Groups:Dis...', 'public:snog_gro...', Array)
#8 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Json->renderView('Snog\\Groups:Dis...', 'public:snog_gro...', Array)
#9 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#11 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#12 src/XF.php(328): XF\App->run()
#13 index.php(13): XF::runApp('XF\\Pub\\App')
#14 {main}
[SIZE=5][B]Request state[/B][/SIZE]
array(4) {
  ["url"] => string(55) "/group_discussions/gun-control-debate.2/edit?post=3&p=2"
  ["referrer"] => string(73) "https://www.ptsdnews.com/group_discussions/gun-control-debate.2/view?id=2"
  ["_GET"] => array(3) {
    ["/group_discussions/gun-control-debate_2/edit"] => string(0) ""
    ["post"] => string(1) "3"
    ["p"] => string(1) "2"
  }
  ["_POST"] => array(6) {
    ["message_html"] => string(42) "<p>me too</p><p>insert edit from user2</p>"
    ["_xfInlineEdit"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(49) "/group_discussions/gun-control-debate.2/view?id=2"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}[code]
 
Got two errors showing in development setup:

I deleted a forum which had a test thread in it.

Code:
Server error log
[LIST]
[*]ErrorException: [E_NOTICE] Undefined index: deleteOwnPost
[*]
[*]src/addons/Snog/Groups/Pub/Controller/Discussion.php:396
[*]Generated by: user3
[*]
[*]Feb 18, 2018 at 8:57 AM
[/LIST]
Stack trace
#0 src/addons/Snog/Groups/Pub/Controller/Discussion.php(396): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/myptsd...', 396, Array)
#1 src/XF/Mvc/Dispatcher.php(249): Snog\Groups\Pub\Controller\Discussion->actionDeletePost(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(87): XF\Mvc\Dispatcher->dispatchClass('Snog\\Groups:Dis...', 'Deletepost', 'json', Object(XF\Mvc\ParameterBag), 'snogGroups', Object(Snog\Groups\Pub\Controller\Discussion), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}
Request state
array(4) {
  ["url"] => string(251) "/group_discussions/dissociative-identity-disorder-did.1/deletepost?id=1&_xfRequestUri=%2Fgroup_discussions%2Fdissociative-identity-disorder-did.1%2Fview%3Fid%3D1&_xfWithData=1&_xfToken=1518904659%2Ce5b7766ab75ffc549997f72e6dc02b2e&_xfResponseType=json"
  ["referrer"] => string(89) "https://www.ptsdnews.com/group_discussions/dissociative-identity-disorder-did.1/view?id=1"
  ["_GET"] => array(6) {
    ["/group_discussions/dissociative-identity-disorder-did_1/deletepost"] => string(0) ""
    ["id"] => string(1) "1"
    ["_xfRequestUri"] => string(65) "/group_discussions/dissociative-identity-disorder-did.1/view?id=1"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1518904659,e5b7766ab75ffc549997f72e6dc02b2e"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}

Code:
Server error log
[LIST]
[*]ErrorException: Template error: Macro public:snog_groups_post_macros:photo_post is unknown
[*]
[*]src/XF/Template/Templater.php:554
[*]Generated by: [URL='https://www.ptsdnews.com/admin.php?users/user2.45895/edit']user2[/URL]
[*]
[*]Feb 18, 2018 at 8:59 AM
[/LIST]
[SIZE=5][B]Stack trace[/B][/SIZE]
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Macro public:sn...', '/var/www/myptsd...', 554, Array)
#1 src/XF/Template/Templater.php(554): trigger_error('Macro public:sn...', 512)
#2 src/XF/Template/Templater.php(658): XF\Template\Templater->getTemplateMacro('public', 'snog_groups_pos...', 'photo_post')
#3 internal_data/code_cache/templates/l1/s85/public/snog_groups_post_edited.php(10): XF\Template\Templater->callMacro('snog_groups_pos...', 'photo_post', Array, Array)
#4 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#5 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('snog_groups_pos...', Array)
#6 src/XF/Mvc/Renderer/Json.php(81): XF\Template\Template->render()
#7 src/XF/Mvc/Renderer/Json.php(65): XF\Mvc\Renderer\Json->renderHtmlFallback('Snog\\Groups:Dis...', 'public:snog_gro...', Array)
#8 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Json->renderView('Snog\\Groups:Dis...', 'public:snog_gro...', Array)
#9 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Json), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'json')
#11 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#12 src/XF.php(328): XF\App->run()
#13 index.php(13): XF::runApp('XF\\Pub\\App')
#14 {main}
[SIZE=5][B]Request state[/B][/SIZE]
array(4) {
  ["url"] => string(55) "/group_discussions/gun-control-debate.2/edit?post=3&p=2"
  ["referrer"] => string(73) "https://www.ptsdnews.com/group_discussions/gun-control-debate.2/view?id=2"
  ["_GET"] => array(3) {
    ["/group_discussions/gun-control-debate_2/edit"] => string(0) ""
    ["post"] => string(1) "3"
    ["p"] => string(1) "2"
  }
  ["_POST"] => array(6) {
    ["message_html"] => string(42) "<p>me too</p><p>insert edit from user2</p>"
    ["_xfInlineEdit"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(49) "/group_discussions/gun-control-debate.2/view?id=2"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}[code]
You mean "Discussion" not "Thread". Or am I misunderstanding what was deleted?

I can't duplicate the first error and I'll need the exact steps to duplicate it. Including if the user deleting the thread was a member of the group, a moderator, the owner or a site admin.

While I can duplicate the second error, the trace you posted is not making any sense. The "Generated by" section is showing an admin link, when it should be showing user info like this..
  • ErrorException: Template error: Macro public:snog_groups_post_macros: photo_post is unknown
  • src/XF/Template/Templater.php:554
  • Generated by: Snog
  • Feb 18, 2018 at 7:50 AM
....

I'll fix the second one tomorrow. But the first one I need more info.
 
Last edited:
Unsure about the first one... it was my admin playing around on the dev board.
So "user3" is an admin on your dev board?

If yes, since that isn't the normal super admin user ID, could you check if you've given that admin "Manage social groups" permission in Group & permissions->Administrators.
 
Last edited:
Sorry, no. User3 is a test user, but I don't know whether the admin assigned it as a mod in the group or not. Sorry... I wasn't the one who caused that error, so flying a little blind with specifics.
 
Sorry, no. User3 is a test user, but I don't know whether the admin assigned it as a mod in the group or not. Sorry... I wasn't the one who caused that error, so flying a little blind with specifics.
Ok, based on that I've put a patch on the download server. Download and install the patched version.
 
Just a thought. It would be handy to have a permission to allow moderators to invite people to join the group.
 
All you need to do is set the member level permissions and the users need to join the group. Their permissions are automatically set for the group.

Hmmm. Some of the groups are quite large. can we batch update people from the old group into the new social group ?
 
Hmmm. Some of the groups are quite large. can we batch update people from the old group into the new social group ?
There is no way to batch update the users of a group for the forum.

I'm not really clear on what you're trying to do. All your users need to do is join the group and their permissions are automatically set.

If you're trying to add a large number of users to a group at once, that's not possible.
 
Last edited:
Permissions are a bit complicated aren't they?

Social group permissions - configured for owner, moderator and member.
All user groups permissions configured for various levels of access and visibilty.

Now I've got to configure the node permissions. I see that in the node several users, the group members have specific permissions. That's fine.

But I'm very unsure on how to set the general permissions for this node, there's nothing in the documentation.
 
Permissions are a bit complicated aren't they?

Social group permissions - configured for owner, moderator and member.
All user groups permissions configured for various levels of access and visibilty.

Now I've got to configure the node permissions. I see that in the node several users, the group members have specific permissions. That's fine.

But I'm very unsure on how to set the general permissions for this node, there's nothing in the documentation.
When you create a group with a forum, there is no need to change permissions for the group forum node. That is all handled automatically by the group system. Changing the node permissions for a group forum is not suggested or supported.

The only permissions you need to set are the Social Group owner, moderator and member permissions. And the Social Group permissions for the user groups (not node permissions) you want to be able to create, view, etc. the groups. You can actually just set the "Registered" user group and leave all other user groups alone. There is no need or reason to change any other permission settings.

Once you've done that, you're done. You don't need change permissions for anything else at any time.

I really don't know how much clearer this could be. And except for the group categories in preparation, it does not mention changing group forum node permissions because it's not needed or supported...
* PREPARATION *
---------------
If you intend to allow users to create a forum for their groups, you should
create categories in the XenForo node list to hold the forums.

At the very least you should create one main category to hold other group
categories. IE:

Social Groups (main category)
- Math (sub-category)
- Science (sub-category)
- History (sub-category)

Set the default category permissions (main category) for registered and unregistered users the way you want them to be.

* INSTALLATION *
----------------

1) Upload all of the files contained in the 'upload' folder to your forum directory.

2) Go to the Admin->Addons and install the Social Groups addon in the normal manner.

3) Go to Admin->Groups & Permissions->Group Settings and select the categories you just created to be used for groups.
Also review the other settings in this area and change what you would like to change.

4) Under Admin->Groups & Permissions->Social Groups, also check the group owner, moderator and member permissions to be sure they are
the way you want them. The default permissions should be fine for most sites.

5) Go to Admin->Groups & Permissions->User Group Permissions and set the Social Group permissions for all groups that you want
to be able to create or view Social Groups.

6) Go to Admin->Users->Administrators and set the Admin Social Groups permission for any admin that should be able to
edit groups and view private groups.

Again, if you are editing the forum node permissions for a group, that is not supported.
 
Last edited:
I really don't know how much clearer this could be

Well it's obviously not clear enough.

We've got our permissions set for the parent category, which are just 'inherit' for all options.
When social groups with forums are created, every single one of them needs the permissions re-setting to 'inherit', or the administrators (at least) can't see the content of the social group.

Would you like me to spell that out in pictures?
 
Well it's obviously not clear enough.

We've got our permissions set for the parent category, which are just 'inherit' for all options.
When social groups with forums are created, every single one of them needs the permissions re-setting to 'inherit', or the administrators (at least) can't see the content of the social group.

Would you like me to spell that out in pictures?
If your administrators can't see the group contents, check the administrator permissions in Admin->Groups & permissions->Administrators and make sure they have the 'Manage social groups' permission checked.

If your admins aren't listed there, then they are not true admins in the eyes of XenForo itself and any check for them being an admin will fail as them not being an admin. Which could also explain why they can't see the group contents.
 
Last edited:
It wasn't set, but that wasn't what fixed it.

What fixed it was setting every single node to 'inherit' rather than the mess of random permissions that the social group forums are created with.
 
If your admins aren't listed there, then they are not true admins in the eyes of XenForo itself and any check for them being an admin will fail as them not being an admin. Which could also explain why they can't see the group contents.

Sorry, that's a bit presumptuous of you isn't it?

Will you stop treating your customers like that please.
 
Last edited by a moderator:
It wasn't set, but that wasn't what fixed it.

What fixed it was setting every single node to 'inherit' rather than the mess of random permissions that the social group forums are created with.
There are no random permissions set. The permissions get set so non-members can not view a group (if it's a private group) and control is then taken over by the group system.

Sorry, that's a bit presumptuous of you isn't it?

Will you stop treating your customers like that please.
I'm sorry if you feel that way. But all I've been trying to do is establish why you felt you needed to change permissions. And to establish if there is an actual problem with the system. I can't duplicate any situation where the permissions for a group forum need to be manually changed. And nobody else has reported a similar problem.
 
Last edited by a moderator:
Snog updated Social Groups for XenForo 2.x with a new update entry:

Social Groups for XenForo 2.x Update 2.0.10

An update to the Social Groups system for XenForo 2.x has been released. Those that have purchased this add-on, please log into your account on my site to download this update.
  • Fix - Error when default XenForo style has been removed from system
  • Fix - No way to delete photos from group photo area
  • Fix - Group creation/join limits not being observed
  • Fix - Latest post/photo/event lists being displayed to non-members for private groups
NOTE: Deleting photos requires the...

Read the rest of this update entry...
 
Top Bottom