Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Email on group join request too late

8 years 9 months ago
  • Daniel's Avatar
    Topic Author
  • Daniel
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active

ISSUE SUMMARY:
When a user requests to join a private group it is expected that group admins receive emails about this request. However, these emails are not sent. Instead they are sent when an community admin approves the request. The mailq table reflects this situation.

STEPS TO REPLICATE:
1 Any user requests to join private group where he/she is not member yet
2
3
4
5
RESULT
No email sent out / mailq table is empty
EXPECTED RESULT
Email sent out / mailq table fills up before
BROWSER

8 years 9 months ago
Licenses:

Hi Ralph,

its a bug. please wait for the fix.

Regards

The following user(s) said Thank You: Daniel
8 years 8 months ago
Licenses:

Hi Ralph,

here the fix:

This attachment is hidden for guests.
Please log in or register to see it.


make sure you are using jomsocial 4.9.0.
unzip that file and put it at:
/components/com_community/controllers/groups.php
/language/en-GB/en-GB.com_community.ini

Regards

This message has an attachment file.
Please log in or register to see it.

The following user(s) said Thank You: Daniel
8 years 8 months ago
  • Daniel's Avatar
    Topic Author
  • Daniel
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active

Hi Albertus,

it took me a while to verify the fix. Unfortunately no email yet when a user requests group join. :(

Regards

Ralph

8 years 8 months ago
Licenses:

Hi Ralph,

please open jomsocial backend > monitor > mail queue
as you can see the email still on pendding status.

please execute the cron job. and make sure at your server, the cronjob setup properly.

documentation.jomsocial.com/wiki/Setting_Up_Cron_Job .

you can asking your server support about how to setup the cron job at server.

Regards

8 years 8 months ago
  • Daniel's Avatar
    Topic Author
  • Daniel
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active

Hi Albertus,

the cron job was setup correctly, but it appears that the mail didn't show up for some time. Now I can see the email as "Blocked" in backend (see picture). What is the reason for it? Everything else in mail queue seems OK.

Attachment blocked.png not found



Regards

Ralph

PS: Just found that "Blocked" means the recipient doesn't want to receive emails. I will have to find the place where this is set, however, how come only the "Owner" of the group receives the email, not the other admins of that group?

Attachments:
8 years 8 months ago
  • Daniel's Avatar
    Topic Author
  • Daniel
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active

None of my users has "etype_group_join_request" set in their params :( That seems to be really an issue. How can I fix it?

Attachments:
8 years 8 months ago
Licenses:

Hi Ralph,

blokced mean that user dont want that notification.
every each users having they on notifications setting at Profile > Preferences > Emails & Notifications

but as administrator, you can reset it by visiting jomsocial backend > configuration > privacy > section: Default User Email & Notifications
at the bottom of page, you can "Reset" all users setting to default.

try to reset first.

Regards

8 years 8 months ago
  • Daniel's Avatar
    Topic Author
  • Daniel
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Licenses:
JomSocial Active

Hi Albertus,

I checked the accounts and in fact found that all users have enabled those email types. After debugging the controller, the following line seems to be the issue:

CNotificationLibrary::add( 'group_join_request', $my->id, $group->ownerid, JText::sprintf('COM_COMMUNITY_GROUP_JOIN_REQUEST_SUBJECT'), '', 'groups.joinrequest', $params );

Several issues are in that line that prevent a correct functioning. The correct line must be
CNotificationLibrary::add( 'groups_member_join', $my->id, $group->ownerid, JText::sprintf('COM_COMMUNITY_GROUP_JOIN_REQUEST_SUBJECT'), '', 'groups.memberjoin', $params );

Please notice that strings that are different. The correct notification property is
group_member_join
whereas the correct template name is
groups.memberjoin
- then correct profile settings and email template are chosen.

Please consider this in next JS version (the issue also appears in groups.trigger.php file - but I cannot see when this code is being executed).

An even better fix is attached which sends the email to all admins of such a group not only it's owner.

Regards

Ralph

Update Seems like I cannot attach the diff file, So I paste it here
3235a3236,3238
>                                       $user = $my;
>                                       $approved = false;
>
3239,3240c3242,3251
<
<                     CNotificationLibrary::add( 'group_join_request', $my->id, $group->ownerid, JText::sprintf('COM_COMMUNITY_GROUP_JOIN_REQUEST_SUBJECT'), '', 'groups.joinrequest', $params );
---
>                                       $params->set('group' , $group->name );
>                                       $params->set('group_url' , 'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$group->id );
>                                       $params->set('user' , $user->getDisplayName() );
>                                       $params->set('user_url' , 'index.php?option=com_community&view=profile&userid='.$user->id );
>                                       $params->set('approved' , $member->approved );
>                                       $admins = $groupModel->getAdmins($groupId, null);
>                                       $subject    = JText::sprintf( 'COM_COMMUNITY_NEW_MEMBER_REQUESTED_TO_JOIN_GROUP_EMAIL_SUBJECT' , '{user}' , '{group}' );
>                                       foreach ($admins AS $admin) {
>                           CNotificationLibrary::add( 'groups_member_join', $my->id, $admin->id, $subject, '', 'groups.memberjoin', $params );
>                                       }

8 years 8 months ago
Licenses:

Hi Ralph,

the notification only for group admin. this is by design.
you can put user voice at here:
uservoice.jomsocial.com/forums/101561-jo...ial-feature-requests

the the fixes of this issue will be included at next release.

Thank You for reporting this.

Regards

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW