• When I enable in plugin settings the option:

    Allow group admins and mods to change members email subscription settings

    I can’t see where to individually change members email settings afterwards (in Group > Admin > Members). Is this option working?

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter etatus

    (@etatus)

    Ok, I can see the problem. With BuddyPress 6.x + Nouveau group members are loaded via AJAX so, there is no call to ‘bp_group_manage_members_admin_item’ action that triggers ass_manage_members_email_status function in BPGES.

    In particular, in file buddypress/bp-groups/bp-groups-admin.php, function bp_groups_admin_edit_metabox_members() starts with:

    // Use the BP REST API if it supported.
    if ( bp_rest_api_is_available() && bp_groups_has_manage_group_members_templates() && get_option('ass-admin-can-edit-email') == 'no' ) { 

    And if you force not to enter this “if”, BPGES works fine, as the group members are loaded in a traditional way (not AJAX).

    The problem when group members are loaded via AJAX is that the user_ids are not available to call bpges function (the loop is done via Javascript in buddypress/bp-templates/bp-nouveau/buddypress/common/js-templates/group-members/index.php), so I couldn’t find an easy way to solve the problem. I hope you can.

    Thread Starter etatus

    (@etatus)

    No comments regarding this issue? It is a feature that currently is NOT working…

    Plugin Author r-a-y

    (@r-a-y)

    I can’t verify this problem.

    If the “Allow group admins and mods to change members email subscription settings” setting is enabled, navigate to the group’s “Manage > Members” page (not the regular group “Members” page) and you should see an “Email status” line with a bunch of links to change the user’s subscription option.

    It should look like this:
    https://i.postimg.cc/Xq73vHyt/ges-admin.png

    Thread Starter etatus

    (@etatus)

    Are you using Nouveau? With Nouveau it seems bp_group_manage_members_admin_item() action is never triggered because users info is loaded via AJAX (REST API) as I mentioned. So the line you commented is not shown. When I force not to use REST API, then the line is shown.

    BTW, I tested this from the backend, when you edit a group (users info is shown in the same way as frontend).

    Plugin Author r-a-y

    (@r-a-y)

    Yes, with Nouveau.

    It seems like you’re on the wrong Members page. You need to go to a group’s “Manage > Members” page. The heading of this page is “Manage Group Members”, which isn’t using AJAX.

    Thread Starter etatus

    (@etatus)

    In the page you mention I can’t see any BPGES option. If AJAX is not used on page load, I’ll try to figure out what is causing the issue and let you know.

    Anyway, if you apply some filter to members in this screen, then AJAX is used. Can you see BPGES settings in that case?

    • This reply was modified 4 years ago by etatus.
    • This reply was modified 4 years ago by etatus.
    • This reply was modified 4 years ago by etatus.
    Plugin Author r-a-y

    (@r-a-y)

    My mistake. My developer instance of BuddyPress doesn’t enable the BP REST API by default.

    I was able to duplicate this problem with the www.remarpro.com version of BuddyPress.

    Unfortunately since Nouveau has updated the “Manage > Members” page to use the REST API, the previous hook, which is meant for the bp-legacy template pack will not work.

    A workaround is to disable the BP REST API if you’re on the “Manage > Members” page with the following snippet:

    add_filter( 'bp_rest_api_is_available', function( $retval ) {
    	if ( bp_is_group_admin_page() && bp_is_action_variable( 'manage-members' ) ) {
    		return false;
    	}
    
    	return $retval;
    } );

    This will re-enable the admin links to change the email subscription, but you lose the filtering options of Nouveau. Depends how much you need this functionality.

    Thread Starter etatus

    (@etatus)

    Mmm, that’s not good. Another workaround if you only need to individually set email settings as a global administrator is to skip the “if” I mention in my first post. Thus, BPGES settings will show on edit group pages in the backend.

    View post on imgur.com

    This is ugly, because you have to touch a buddypress core file (buddypress/bp-groups/bp-groups-admin.php) and also after changing an individual email setting for a member, you are redirected to frontend group settings page. But it works…

    I think this feature is quite important to make individual corrections in some groups. I hope you can provide a solution soon.

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Admins can’t change members email subscription settings’ is closed to new replies.