Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter michaelimi

    (@michaelimi)

    I had to remove the plugin shortcode from the homepage because it was displaying an error. I placed it on a new page so you can see what is happening. The page is: https://pria.us/social-test/

    Thread Starter michaelimi

    (@michaelimi)

    We are using Stripe for the payments.

    Thread Starter michaelimi

    (@michaelimi)

    We also have a lot of payments that are listed as “pending” (no payment received) but on the payment processor side everything has gone through just fine. We aren’t talking about a 1 or 2 day period, we are talking about 20 days later the payment is still pending and never goes to Completed. This presents a huge issue for us as we can no longer tell who has paid and has not.

    Thread Starter michaelimi

    (@michaelimi)

    I did not get any further. BuddyBoss has escalated my ticket with them to their advance team. It is related to this ticket but also to another issue where the BuddyBoss > Activity, “View Activity” links are not working and so the content of emails (Tokens) are not working correctly or the reply link is not working.

    Thread Starter michaelimi

    (@michaelimi)

    I think I have identified the issue. This function below is the culprit. Specifically the part about

    “/** bbPress 2 ****************************************************/ // groan! bbPress 2 hacks! // // when bbPress first records an item into the group activity stream, it is // incomplete as it is first recorded on the ‘wp_insert_post’ action”

    /**
     * Block some activity types from being sent / recorded in groups.
     *
     * @since 3.2.2
     */
    function ass_default_block_group_activity_types( $retval, $type, $activity ) {
    
    	/*
    	 * Do not resend a previous bbPress forum item to the group.
    	 *
    	 * This can occur when unapproving a forum post and later, reapproving it.
    	 * We do this by checking the forum post's '_bbp_activity_id' meta entry.
    	 */
    	if ( 'bbp_topic_create' === $type || 'bbp_reply_create' === $type ) {
    		$prev_activity_id = get_post_meta( $activity->secondary_item_id, '_bbp_activity_id', true );
    		if ( ! empty( $prev_activity_id ) ) {
    			return false;
    		}
    	}
    
    	switch( $type ) {
    		/** ACTIVITY TYPES TO BLOCK **************************************/
    
    		// we handle these in ass_group_notification_forum_posts()
    		case 'new_forum_topic' :
    		case 'new_forum_post' :
    
    		// @todo in the future, it might be nice for admins to optionally get this message
    		case 'joined_group' :
    
    		// BP handles these notifications on its own.
    		case 'group_details_updated' :
    
    		case 'created_group' :
    			return false;
    
    			break;
    
    		/** bbPress 2 ****************************************************/
    
    		// groan! bbPress 2 hacks!
    		//
    		// when bbPress first records an item into the group activity stream, it is
    		// incomplete as it is first recorded on the 'wp_insert_post' action
    		//
    		// it is later updated on the 'bbp_new_reply' / 'bbp_new_topic' action
    		//
    		// we want to block the first instance, so GES doesn't record or send this
    		// incomplete activity item
    
    		// reply
    		case 'bbp_reply_create' :
    
    			// to determine if the reply activity item is incomplete, the primary link
    			// will be missing the scheme (HTTP) and host (example.com), so our hack does
    			// a search for '://' because the site could be using HTTPS.
    			if ( strpos( $activity->primary_link, '://' ) === false ) {
    				return false;
    
    			// we're okay again!
    			} else {
    				return $retval;
    			}
    
    			break;
    
    		// topic
    		case 'bbp_topic_create' :
    
    			// to determine if the topic activity item is incomplete, the primary link
    			// will be missing the groups root slug
    			if ( strpos( $activity->primary_link, '/' . bp_get_groups_root_slug() . '/' ) === false ) {
    				return false;
    
    			// we're okay again!
    			} else {
    				return $retval;
    			}
    
    			break;
    
    		/** ALL OTHER TYPES **********************************************/
    
    		default :
    			return $retval;
    
    			break;
    	}
    }
    add_filter( 'ass_block_group_activity_types', 'ass_default_block_group_activity_types', 5, 3 );

    I am assuming the BuddyBoss has altered this and is no longer recording to the database like this. This does seem to fix the issue though after commenting out the section related to “case ‘bbp_reply_create’ :” and “case ‘bbp_topic_create’ :”.

    One thing to mention is that new topics are not being sent in the daily digest even though the subscriber is set to daily digest. The new topic notifications are being sent immediately. The replies are being sent in the daily digest as expected. Maybe this is a consequence of commenting out the code?

    Thread Starter michaelimi

    (@michaelimi)

    Thanks, Boone. I edited this function function “ass_group_notification_activity” from bp-activity-subscription-functions.php specifically adding error logging as you can see below.

    function ass_group_notification_activity( BP_Activity_Activity $activity ) {
        try {
            $is_group_activity_item = buddypress()->groups->id === $activity->component;
    
            // Error logging for debugging purposes
            if (!$is_group_activity_item && 'activity_comment' === $activity->type) {
                $root_activity = new BP_Activity_Activity($activity->item_id);
                $is_group_activity_item = buddypress()->groups->id === $root_activity->component;
                if (!$is_group_activity_item) {
                    error_log('ass_group_notification_activity: Activity comment not associated with a group.');
                }
            }
    
            if (!$is_group_activity_item) {
                error_log('ass_group_notification_activity: Not a group activity item.');
                return;
            }
    
            if (false === apply_filters('ass_block_group_activity_types', true, $activity->type, $activity)) {
                error_log('ass_group_notification_activity: Activity type is blocked.');
                return;
            }
    
            if (!ass_registered_long_enough($activity->user_id)) {
                error_log('ass_group_notification_activity: User not registered long enough.');
                return;
            }
    
            $group_id = $activity->item_id;
            if ('activity_comment' === $activity->type) {
                $group_id = bp_get_current_group_id();
            }
    
            $group = groups_get_group(['group_id' => $group_id]);
            if (!$group->id) {
                error_log('ass_group_notification_activity: No group found with ID: ' . $group_id);
                return;
            }

    The error it logged was

            if (false === apply_filters('ass_block_group_activity_types', true, $activity->type, $activity)) {
                error_log('ass_group_notification_activity: Activity type is blocked.');
                return;
            }

    So I added this to my child theme functions.php

    add_filter('ass_block_group_activity_types', '__return_true', 20);

    Once I added this filter to set it to return true emails started working again as well as the daily and weekly digest items started to populate.

    I have not located the reason why it is returning false without the filter. Do you have any insight?

    Thread Starter michaelimi

    (@michaelimi)

    Boone, I have tried everything I can think of to get this to work. Is there a way we can set up a staging site for you to test with? Or what else can we try to get this to work?

    Thank you for your help!

    Thread Starter michaelimi

    (@michaelimi)

    I am creating a group and a discussion within the group.

    The initial discussion and the replies are loaded into the activity feed

    I just posted a reply to a group and discussion that I created by another user and the notification did show up in the notifications section.

    No email was sent out though, nor was anything added to the database table wp_bpges_queued_items

    • This reply was modified 2 years, 1 month ago by michaelimi.
    Thread Starter michaelimi

    (@michaelimi)

    No, it is not happening. There is no new activity in the wp_bpges_queued_items table after posting to a group.

    Thread Starter michaelimi

    (@michaelimi)

    I am certain that the two members are subscribed to Daily Digest for the group.

    The wp_bpges_subscriptions table looks like this

    When I subscribe to All Emails to see if immediate emails work, nothing is sent out as well. So the problem looks to be for all emails sent by the plugin.

    Hey, I am a little late to this but I came across a fix for this provided by Beaver Builder. This worked for me and I was having the same issue where the header and footer would only show but no post content. I do use Beaver Builder and this worked.

    Beaver Builder asked Public Post Plugin to deploy the fix here: https://github.com/ocean90/public-post-preview/issues/172

    Here is the fix below. Place it in the child theme’s functions.php file.

    add_filter( ‘fl_render_content_by_id_can_view’, function( $can_view, $post_id ) { if ( class_exists( ‘DS_Public_Post_Preview’ ) ) { $post_ids = get_option( ‘public_post_preview’, array() ); $post_ids = array_map( ‘intval’, $post_ids ); $can_view = ( in_array( $post_id, $post_ids ) ) ? true : $can_view; } return $can_view; }, 10, 2 );

    michaelimi

    (@michaelimi)

    I had the same issue with SiteGround hosting. It turned out that even though SiteGround runs Apache servers they use NGINX to serve static files. It was causing my .htaccess files to be ignored. I turned off NGINX static delivery and UAM works as it should now. WP Engine uses Apache and NGINX as well so you may need to do the same. Hope this helps!

    Thread Starter michaelimi

    (@michaelimi)

    It started working after 30 minutes.

    Thread Starter michaelimi

    (@michaelimi)

    Ok, so for everyone else’s benefit who hosts with Siteground please know that you MUST turn of NGINX delivery for UAM to work!

    I was stuck for a day setting up the .htaccess file on Siteground hosting.
    In fact, SiteGround serves the static asset files on top of Nginx to make the website faster. However, one of my .htaccess rules is to protect media files from direct access and it no longer trigger due to NGINX DIRECT DELIVERY.

    This is a warning message from SiteGround.

    With NGINX Direct Delivery we will serve most of the static resources of your website (images, JS, CSS and others) directly through NGINX to achieve the fastest possible loading time. It works for all kind of applications without additional customisation.

    For best results we highly recommend having NGINX Direct Delivery enabled at all times. However, if you need to use custom caching .htaccess rules for your static content you may need to switch it off.

    To make my .htaccess rule work as expect, I had to turn off NGINX Direct Delivery option under the speed > caching of SiteGround’s setting.

    Make sure to flush the dynamic cache before testing the rule again.

    michaelimi

    (@michaelimi)

    Did you find a fix for this?

Viewing 15 replies - 1 through 15 (of 17 total)