Skip to:
Content
Pages
Categories
Search
Top
Bottom

Bug w/ BuddyPress Activity Privacy & rtMedia

  • Profile photo of savor2
    savor2
    Participant

    @savor2

    @megainfo

    Rtmedia enables image attachments to the Buddy Press activity feed. When an image is attached it calls wp-admin/admin-ajax.php which returns the post with an image preview like this:

    <li class="activity rtmedia_update activity-item date-recorded-1403887126 message" id="activity-38">
    	<div class="avatar">
    		<a href="http://www.domain.com/members/mike/">
    			<img src="http://www.domain.com/wp-content/uploads/avatars/1/677f1907f1aac6aeb3ce3d4ef60e01d2-bpthumb.jpg" class="avatar user-1-avatar avatar-120 photo" width="120" height="120" alt="Profile picture of Mike" />		</a>
    	</div>
    
    	<div class="activity-content">
    
    		<div class="activity-header">
    
    			<p><a href="http://www.domain.com/members/mike/" title="Mike">Mike</a> posted an update <a href="http://www.domain.com/activity/p/38/" title="View Discussion"><span class="time-since">right now</span></a></p>
    
    		</div>
    
    			<div class="activity-inner">
    
    				<div class="rtmedia-activity-container">
    <div class="rtmedia-activity-text">x</div>
    <ul class="rtmedia-list large-block-grid-3 rtmedia-activity-media-length-1">
    <li class="rtmedia-list-item media-type-photo"><a href="http://www.domain.com/members/mike/media/12/" rel="nofollow">
    <div class="rtmedia-item-thumbnail"><img src="http://www.domain.com/wp-content/uploads/rtMedia/users/1/2014/06/Cool-2-320x240.jpg" /></div>
    <div class="rtmedia-item-title">Cool-2</div>
    <p></a>
    <div class="rtmedia-item-actions"></div>
    </li>
    </ul>
    </div>
    
    			</div>
    
    			<div class="activity-meta">
    
    					<a href="?ac=38/#ac-form-38" class="link acomment-reply bp-primary-action" id="acomment-comment-38">Comment <span>0</span></a>
    
    						<a href="http://www.domain.com/activity/favorite/38/?_wpnonce=77f7732c12" class="link secondary fav bp-secondary-action" title="Mark as Favorite">Favorite</a>
    
    				<a href="http://www.domain.com/activity/delete/38?_wpnonce=e58c2e1f2f" class="button item-button bp-secondary-action delete-activity confirm" rel="nofollow">Delete</a>
    
    			</div>
    
    	</div>
    
    		<div class="activity-comments">
    
    				<form action="http://www.domain.com/activity/reply/" method="post" id="ac-form-38" class="ac-form">
    					<div class="ac-reply-avatar"><img src="http://www.domain.com/wp-content/uploads/avatars/1/677f1907f1aac6aeb3ce3d4ef60e01d2-bpthumb.jpg" class="avatar user-1-avatar avatar-120 photo" width="120" height="120" alt="Profile picture of Mike" /></div>
    					<div class="ac-reply-content">
    						<div class="ac-textarea">
    							<textarea id="ac-input-38" class="ac-input" name="ac_input_38"></textarea>
    						</div>
    						<input type="submit" name="ac_form_submit" class="tiny button radius" value="Post" />   or press esc to cancel.						<input type="hidden" name="comment_form_id" value="38" />
    					</div>
    
    					<input type="hidden" id="_wpnonce_new_activity_comment" name="_wpnonce_new_activity_comment" value="203136d3e9" /><input type="hidden" name="_wp_http_referer" value="/wp-admin/admin-ajax.php" />
    				</form>
    
    		</div>
    
    	    <div class="clearfix"></div>
    </li>

    However, if BuddyPress Activity Privacy is enabled, it only returns the text without the image like this:

    <li class="activity activity_update activity-item date-recorded-1403887180 message" id="activity-39">
    	<div class="avatar">
    		<a href="http://www.domain.com/members/mike/">
    			<img src="http://www.domain.com/wp-content/uploads/avatars/1/677f1907f1aac6aeb3ce3d4ef60e01d2-bpthumb.jpg" class="avatar user-1-avatar avatar-120 photo" width="120" height="120" alt="Profile picture of Mike" />		</a>
    	</div>
    
    	<div class="activity-content">
    
    		<div class="activity-header">
    
    			<p><a href="http://www.domain.com/members/mike/" title="Mike">Mike</a> posted an update <a href="http://www.domain.com/activity/p/39/" title="View Discussion"><span class="time-since">right now</span></a></p>
    
    		</div>
    
    			<div class="activity-inner">
    
    				<p>bv</p>
    
    			</div>
    
    			<div class="activity-meta">
    
    					<a href="?ac=39/#ac-form-39" class="link acomment-reply bp-primary-action" id="acomment-comment-39">Comment <span>0</span></a>
    
    						<a href="http://www.domain.com/activity/favorite/39/?_wpnonce=77f7732c12" class="link secondary fav bp-secondary-action" title="Mark as Favorite">Favorite</a>
    
    				<a href="http://www.domain.com/activity/delete/39?_wpnonce=e58c2e1f2f" class="button item-button bp-secondary-action delete-activity confirm" rel="nofollow">Delete</a>
    				<select class="bp-ap-selectbox"><option class="fa fa-public"  selected='selected' value="public"> Anyone</option><option class="fa fa-loggedin"  value="loggedin"> Logged In Users</option><option class="fa fa-friends"  value="friends"> My Friends</option><option class="fa fa-mentionedonly"  value="mentionedonly"> @mentioned only</option><option class="fa fa-adminsonly"  value="adminsonly"> Admins Only</option><option class="fa fa-onlyme"  value="onlyme"> Only me</option></select>
    			</div>
    
    	</div>
    
    		<div class="activity-comments">
    
    				<form action="http://www.domain.com/activity/reply/" method="post" id="ac-form-39" class="ac-form">
    					<div class="ac-reply-avatar"><img src="http://www.domain.com/wp-content/uploads/avatars/1/677f1907f1aac6aeb3ce3d4ef60e01d2-bpthumb.jpg" class="avatar user-1-avatar avatar-120 photo" width="120" height="120" alt="Profile picture of Mike" /></div>
    					<div class="ac-reply-content">
    						<div class="ac-textarea">
    							<textarea id="ac-input-39" class="ac-input" name="ac_input_39"></textarea>
    						</div>
    						<input type="submit" name="ac_form_submit" class="tiny button radius" value="Post" />   or press esc to cancel.						<input type="hidden" name="comment_form_id" value="39" />
    					</div>
    
    					<input type="hidden" id="_wpnonce_new_activity_comment" name="_wpnonce_new_activity_comment" value="203136d3e9" /><input type="hidden" name="_wp_http_referer" value="/wp-admin/admin-ajax.php" />
    				</form>
    
    		</div>
    
    	    <div class="clearfix"></div>
    </li>

    The user must refresh the page before the attachment appears in the activity feed. Because the attachment does not appear immediately the users think it didn’t upload and delete their activity before refreshing the page.

    I’m sure this is being caused by BuddyPress Activity Privacy because I am able to toggle this behavior by activating and disabling the plugin.

    http://wordpress.org/support/topic/activity-feed-bug-w-rtmedia

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bug w/ BuddyPress Activity Privacy & rtMedia’ is closed to new replies.