Bug Problems After Importing From [TL] Social Groups

Arcadian

Customer
Hey,

The good news is the social groups content now imports with the latest version however there seems to be some issues with the member permissions.

For example, I'm the supervisor (admin) of a group but the "Join Group" button is still visible - and when you click on it gives this error (expected because I'm a member), if you check the Supervisors page, it says I'm the supervisor but again has the Join Group / Add Supervisor buttons.

socialgroups0.png

socialgroups1.png socialgroups2.png

Then it gets more weird. I can create a new discussion within the group but if I go to read any discussions I get this error....

socialgroups3.png

Don't know what is going on, the import seems to work, in the database the xf_dbtech_social_groups_group_member table has all the IDs etc

database.png

I've double checked all the permissions and they all seem to be correct too. And I've rebuilt all the DBT Social Group caches.
 
Could you please check the xf_user table and see if dbtech_social_groups_group_ids contains all the necessary IDs from the xf_dbtech_social_groups_group_member table?
 
In the xf_user table there is...

dbtech_social_groups_group_ids - all the entries are NULL
dbtech_social_groups_group_count - all the entries are 0
dbtech_social_groups_group_joined_count - all the entries are 0

Firefox_Screenshot_2024-04-08T12-33-13.084Z.webp
 
Right, that's the problem then. There's currently no rebuild feature that would update these counts.

Try running the following SQL queries:
SQL:
UPDATE xf_user
LEFT JOIN (
    SELECT user_id, GROUP_CONCAT(group_id SEPARATOR ',') AS joined_groups, COUNT(*) as num_groups
    FROM xf_dbtech_social_groups_group_member
    GROUP BY user_id
) as tmp USING(user_id)
SET xf_user.dbtech_social_groups_group_ids = tmp.joined_groups,
 xf_user.dbtech_social_groups_group_joined_count = IFNULL(tmp.num_groups, 0)

SQL:
UPDATE xf_user
LEFT JOIN (
    SELECT sg.user_id, COUNT(*) as num_created_groups
    FROM xf_dbtech_social_groups_group_member AS group_member
    LEFT JOIN xf_dbtech_social_groups_group AS sg USING (group_id)
    WHERE sg.user_id = group_member.user_id
    GROUP BY group_member.user_id
) as tmp USING(user_id)
SET xf_user.dbtech_social_groups_group_count = IFNULL(tmp.num_created_groups, 0)

I will look into updating the importer to add these queries, but for now I'm still busy with the XF 2.3 conversion :)
 
As it turns out, this was a typo in the post-import cron job queue. There is a rebuild job that effectively does what those queries do, but I typo'd the name in the "run these jobs after import" bit in the code.

I've hotfixed v1.3.0 so this won't affect anyone else / any future imports you do if you re-download that version.

Sorry about that!
 
Hello @Arcadian,

We hope your ticket regarding DragonByte Social Groups has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 

DragonByte Social Groups

XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
107
Customer rating
0.00 star(s) 0 ratings
Back
Top