Full list of user on first page with rtmedia

When I active the rtmedia plugin. The full list of user are listed on the first page if the user is not login ( I have 1800 users ), /* */

and only the friends of the user, if the user is login.

They are not shown on the webpage, but the webpage it makes the webpage very heavy to load.

I have buddypress activated.

1 Like

Hello @guynemer55,

We are not very clear with your query. Could you please explain it with some example or screenshots?

They are not shown on the webpage, but the webpage it makes the webpage very heavy to load.

Could you please check the page load with the Query monitor plugin? - https://wordpress.org/plugins/query-monitor/ plugin? That will let you know what is the cause of slowness.

Thank you, Pranali

Hello @pranalipatel,

Thank you for your message.

Sorry to have been unclear, I have :

  • bbpress
  • buddypress
  • rtmedia activated.

When I activate rtmedia, I can see the following script in the frontpage of my website

BP_Suggestions lists all my friends when the user is logged on my website. BP_Suggestions lists all the buddypress users for anonymous browsing.

I don’t if this “BP_Suggestions” comes from rtMedia or from an incompatibility between rtMedia and another plugin

Thank you

Hey,

I am having the same problem. It’s ridiculous for 2 reasons:

  1. Privacy - you display names of all our users on all the freaking pages their user Id name etc…
  2. Page load, as guynemer55 mentioned before it’s terrible for pageload! insane actually, I only uploaded 500 of my 7000 users on a new website and it’s killing my page speed.

Here’s the problem description: var rtmedia_upload_progress_error_message = “There are some uploads in progress. Do you want to cancel them?”;var BP_Suggestions = {“friends”:[{“ID”:“xx”,“image”:“pic url”,“name”:"(user id)"},

This goes on… for each user on the website.

It’s a huge oversight, I want to launch my site and I’ve just stumbled upon this issue.

As he mentioned before even if someone IS NOT logged in he sees all these suggestions.

I have two questions:

  1. Which plugin out of RT media to delete to prevent this from happening until you fix this issue?
  2. If not remove how can I fix this issue, I can’t have information of all my users displayed in a freaking source code on everypage that anyone can easily access. It’s very insecure and against any privacy policies.

I can’t import more users because imagine the mess I’ll have on my site when I do that.

Oh btw, only with 500 users the text file size generated by your code weights nearly 100kb, well if I import another 6,500… then the file size will be over 50% of my current site size, just by code generated by your site, pls explain me what’s causing it and how to fix this ASAP.

Hello @n0mad and @guynemer55,

Here is the quick update regarding your query:

We found that BP_Suggestions under the view source is getting added from the BuddyPress plugin and not from the rtMedia.

Here is the file from where it is getting attached from `BuddyPress’: https://github.com/buddypress/BuddyPress/blob/0faef9acb5356f8e3e1c6045e6876fb736fb6d28/src/bp-friends/bp-friends-functions.php#L814

To cross-check the same on your end, you can once try deactivating all rtMedia plugins and keep the BuddyPress plugin active. You will still find the BP_Suggestions array under the view source.

Kindly, let us know if you have any doubts.

Thank you, Pranali

Dear @pranalipatel,

the BP_Suggestions is added by buddypress, but only if rtmedia is activated.

Regards,

Also could you try to actually help us rather than trying to say … hey it’s not us it’s the evil buddypress causing all the trouble.

So pls tell me:

  1. What I can do to stop all user IDs etc from displaying in page source. Given that you’ve already identified the problem, and as the other person said, it only exists when rtmedia is installed.

Hello @guynemer55,

the BP_Suggestions is added by buddypress, but only if rtmedia is activated.

No, BP_Suggestions will get added even if rtMedia is not activated. Please, once try deactivating rtMedia as suggested in the previous reply.

@n0mad,

I would love to help you guys if the issue is from our plugin.

I have provided the file from where it is getting added from the BuddyPress plugin. This does not require rtMedia active on the website. Please, cross-check the same and let us know if you do not find the BP_Suggestions in the view source when rtMedia is deactivated.

@guynemer55 and @n0mad,

If you are still facing this issue, can you show me your demo site where you have deactivated rtMedia plugin but it’s still showing those content in view source?

I look forward to your reply. Thanks.

Hey,

My dev guy managed to solved it. I’ve asked him to share how and he said: The buddypress is displaying friend list using jquery so that when you type @ to mention anyone in your comment or post then it will display lists of friends in dropdown from this list. We have deque the script for non logged in users

Hope this helps, it didn’t involve changing buddypress core, this list won’t be displayed for non logged in users anymore.

Anyway I’m disappointed with support here, I think with issues like that even when it’s related to buddypress directly rather than rtmedia bug/error, figuring it out with your knowledge of buddypress probably doesn’t take long and you could help your clients with little effort.

This is not the case for me. If I disable rtMedia and If I keep buddypress, I don’t see the BP_Suggestions

@n0mad could you share with us your workaround ?

Thank you

Hey my developer is away now, but I’ll try to get him to write a brief on how to solve it tomorrow. He only wrote what I’ve shared above earlier on. Anyway the good news that this fix is apparently quite easy and it works like a charm. All the IDs and other information that was displayed before is gone from the view source page.

Hello @n0mad,

Thanks for the information. It will be helpful to other users as well.

Since we found issue coming from BuddyPress core plugin via BP_suggestion for friends, and rtMedia code not doing anything on that, hence it’s out of our support scope. If it was from rtMedia code, we always provide support on priority to get it fix.

@guynemer55,

Could you please show me the URL of your demo site?

Thank you, Pranali

Hello,

I’m sorry to say, but I believe this is an issue in rtMedia code.

This is the code in question:

That code bypasses the first check in Buddypres’ bp_friends_prime_mentions_results() function, and when that function completely runs for non logged in users, it will cause the issue of listing ALL users on any page for non-logged in users. This is a huge issue, on a site with over 60k users, this resulted in php’s memory usage of over 300mB, and processing times of over 10 seconds.

While I’d agree that Buddypress should probably have some protection in its code against this, ultimately the root cause of the issue is the rtMedia code linked above. Please fix it.

For anyone having this problem (and that’s everyone using rtMedia plugin with Buddypres’ Friend Connections component), this is a simple fix you can add to your theme’s functions.php until rtMedia provides a fix for it. function fix_rtmedia_loading_for_anon($load_mentions, $mentions_enabled) { if ( get_current_user_id() == 0 ) { return false; } return $load_mentions; }

add_filter( ‘bp_activity_maybe_load_mentions_scripts’, ‘fix_rtmedia_loading_for_anon’, 10002, 2 );

My good God you guys really saved my bacon with that fix :wink:

Really thanks a lot for posting. I have 200,000 users, as you can imagine the page source was getting a bit unwieldy.

What was weird, is that for me it was only happening in IE and Chrome. In firefox it wasn’t happening and the pages were fast. No explanation for that. I cleared caches, hard refresh, everything could not find any reason why it was only happening in some browsers.

Again, really thanks for posting.