Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Popular Features › Members Map › Disconnect between Map and Members
- This topic has 20 replies, 2 voices, and was last updated 3 years, 3 months ago by
Manathan.
-
AuthorPosts
-
René WappiezParticipant@wappiez
- 106 Topics
- 352 Posts
Hi,
There seems to be a disconnect between our members Map and the Members on the page.
We use pagination, per 24, and even on the first page, the 24 members shown on the Map
are not the same as shown on the first page:https://dating.wappiez.nl/leden/membersmap/
It does show only 24 though, does there is some connection, but just not a good one.
Any idea on how to fix this?Thx
October 29, 2021 at 10:05 #36339@themodactyl- 0 Topics
- 6712 Posts
Hi René,
Unfortunately, we have no clue. 🤷🏻♀️
As this issue is related with the BP Maps for Members, it’s best if you try to reach the plugin authors. They will be more informed and better suited to help you.
To go further, we invite you to post your request on their support forums:
https://www.philopress.com/support/Don’t hesitate to share the solution with us. I’m sure it will help other users facing the same issue. By doing this, you will be making a great contribution to this forum, and we thank you very much for that! #SharingIsCaring 💪🏻
Best,
November 2, 2021 at 09:56 #36389René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Kay, so I had contact and my devs had a second look at it. Looks like the problem is exactly the opposite. Because there is a connection between the pagination and BP Maps for members, BP Maps is not shown correctly. BP Maps will only show all members. Now it only shows 24 random members. So, the solution would be to create a disconnect between the pagination and the BP Maps for Members plugin. Do you know how?
Also, my devs told me this was because it was created on the Customizer that the pagination was hard coded into the theme. I’m not sure we did this or it was like this from the start, but maybe you could help me out with a nice snippet? Pleaseeee. 🙂
Thx
November 4, 2021 at 10:39 #36486@themodactyl- 0 Topics
- 6712 Posts
Hi René,
Thank you for your feedback.
I suggest you to increase the number of members to display. You should be able to change that option in Customizer > BuddyPress > Members Directory. Please find the attached screenshot.
Changing this should solve your issue.
Best,
November 10, 2021 at 10:22 #36682René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Well yeah, we know this, but then we’ll have to put in 0. Do you know how slow the page will get when we need to load all the members? I feel a limit is always necessary.
November 10, 2021 at 14:12 #36686René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Maybe it’s possible to have the Map on a single page and the search form on a single page?
November 10, 2021 at 14:26 #36689René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Could you tell me if the form on the members directory was created with BuddyBoss Profile Search or the BP Profile Search plugin?
I’m thinking of creating a disconnect by duplicating the Members Directory page limit in Customizer and put one on the Map page and one on the Search form page. You think this is possible?
I will still need to create a disconnect though and for this need to contact the authors of the Search form to hopefully change the shortcode.
November 12, 2021 at 12:51 #36737@themodactyl- 0 Topics
- 6712 Posts
Hi René,
To change this, simply add the following code snippet to your website:
/** * Disconnect the limit of members displayed in the map page */ add_action( 'bp_before_members_page_map', function() { add_filter( 'grimlock_buddypress_members_per_page', function( $per_page ) { return 0; }, 999 ); add_filter( 'bp_ajax_querystring', function ( $query_string, $object ) { if ( ! is_string( $query_string ) || 'members' !== $object ) { return $query_string; } $query_args = explode( '&', $query_string ); foreach ( $query_args as $key => $query_arg ) { if ( strpos( $query_arg, 'per_page' ) !== false ) { unset( $query_args[ $key ] ); break; } } $query_args[] = 'per_page=0'; $query_string = implode( '&', $query_args ); return $query_string; }, 999, 2 ); } );
To add this code snippet to your site, we recommend that you use the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post: Adding Custom PHP Without Changing Your Child Theme.
Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.
Hope this will suits your needs. 🙂
Regards,
November 15, 2021 at 10:39 #36776René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Thank you.
I’m getting a 500 error however when I activate it.
November 15, 2021 at 11:13 #36777@themodactyl- 0 Topics
- 6712 Posts
Hi René,
Please be aware that we just updated the snippet in my previous answer.
However, we believe your 500 error is related to the latest version of the BP Maps for Members plugin. We will be releasing an update of Grimlock for BuddyPress plugin very soon which should resolve your issue.
I will be back to you as soon as this update is available! 🙂
Best,
November 16, 2021 at 12:30 #36865René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
I’m not sure that this is because of the new BP Maps for Members update, because we also have a staging environment and I was unable to update to the newest BP Maps for Members update there because I was unauthorized. And I’m still getting a 500 error. Do you want me to give you access to our staging site as well?
November 16, 2021 at 13:12 #36870@themodactyl- 0 Topics
- 6712 Posts
Thank you for your feedback.
To help us getting clues and find a solution to this issue, please activate logging on your website, just turn WP_DEBUG to true, by pasting the following code lines in your wp-config.php file, just before the line that says ‘That’s all, stop editing! Happy blogging.’:
// Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
More on this in the following topic: Debugging in WordPress.
Once the debug log is activated, please can you reproduce this issue? This way, when you’ll face this error again, we should be able to read the error. Then, could you share the content of your debug.log file with us please? You can post the content of this file as plain text in your next reply and mark it as private to keep this between us.
After having reviewed your next reply, we’ll be able to tell you if the issue is caused by our product, a third party plugin or any type misconfiguration on your server. If we’re not able to help, we’ll recommend you to transfer the error logs to the plugin author or to your server hosting support.
Thank you.
November 16, 2021 at 13:20 #36873René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
This reply has been marked as private.November 17, 2021 at 09:05 #36889René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
It’s quite big, sorry for that.
So my devs told me the error 500 is due to because the page limit is removed and too much information is loaded. My idea was to keep the pagination on the members directory, but to remove the page limit only on the members Map.
So basically what I want is to use the option in the attached image. Currently when I click on it, the whole thing disappears. Does that mean that when I click on it, the pagination is removed? It should not remove the pagination on the members directory because too many members need to be loaded.
So the first step should be to remove the Map from the members page and keep the pagination on 40 members per page.
Then step 2 should be to give the members Map it’s own page.
November 17, 2021 at 09:12 #36891@themodactyl- 0 Topics
- 6712 Posts
Hi René,
It is correct. Due to your large number of members, there is too much information to load. For this reason, you get a 500 error.
Please note that the snippet doesn’t work in the directory. I think you use the wrong term, you certainly mean the members list next to the map. Note that what you’re looking for is possible, but I’m afraid you’ll get the same result as the number of users to load is the same. 🤔
Concerning the option in the screenshot you share with us, please be aware that it has nothing to do with the members map page. In fact, it is related to the Location tab in the user profile. When a member has a valid location, this location is displayed in the profile of this user.
Let me know if you need more explanations René. 🙂
Be aware that we have just released a new update of Grimlock for BuddyPress.
Best,
November 17, 2021 at 13:56 #36908René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Oops, I uploaded the wrong image. See the correct one attached. Before, it was possible to click on this and then the Map would disappear and only the members would be visible. Now if I click on it, everything disappears. Is there a way to not have the members disappear?
But are you saying there is a limit on the amount of people than can be shown on the Map? I’m at 1500 members and it’s already too much? Thats crappy. Maybe I should look at another Map that is able to work with the members area?
Ideally the Map could choose not to load all the members and would only be activated when a search on Location is performed. That way a maximum amount of members could be set and a message would appear if there are too many members to load. This would be the correct way to go. I’ll send Shane from Philopress a message about this. Curious to what he will say.
What did the new Grimlock update bring?
November 17, 2021 at 14:34 #36911@themodactyl- 0 Topics
- 6712 Posts
Hi René,
I’m afraid at this point your questions are related to the behavior of the BP Maps for Members plugin. I will do my best to answer you. 🤔
Regarding the option in your screenshot, it has certainly been modified by the PhiloPress team. I am afraid that changing this option will require custom development.
It is indeed a shame that too many members to load is difficult to display. I think your solution might work. However, I suggest you also look at the server level. You could try increasing the limits of your server. It’s still a lot of members, but I think it might help.
As we talked about an alternative in one of your previous topics, there aren’t many other solutions. However, we are open to feedback in case you have found something similar that might meet your needs. If so, please feel free to share this potential solution with us:
It is indeed a good idea to reach out PhiloPress team about this. Don’t hesitate to share their feedback with us René. 🙂
Best,
November 18, 2021 at 09:41 #36918René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Their response:
Our plugin does not limit the number of members being processed – unless you set the number in the settings screen.
If you do not set a limit and you get a 500 error – that means your server is out of resources, probably memory. We cannot control that.I will try to increase the limits. But I think it’s weird that I have to increase the limit, because that would indicate that if I disconnect the Map, that all members will be loaded. But that’s not what I want. I want the members limit to be kept on 40 per page.
November 18, 2021 at 10:58 #36929René WappiezParticipant@wappiez- 106 Topics
- 352 Posts
Further info:
You are using both the map and the members on the same page – therefore you are using BP_User_Query twice and that loop will affect both areas.
The solution is specific to your site / theme. You probably need to write a custom loop for the members listings. Or adjust how your theme handles the loop.
Do you know someone who can help?
November 18, 2021 at 15:42 #36932@themodactyl- 0 Topics
- 6712 Posts
Hi René,
Thank you for sharing their feedback with us.
It seems that your solution is a good idea, as you’ll use only one query. 🙂
We recommend you to require the services from Envato Studio freelancers (https://studio.envato.com/explore/websites-programming). This web platform gives you access to developers who have already experience with theme customizations, and for very competitive prices. We received really great feedbacks from our clients about Envato Studio freelancers.
Best,
November 19, 2021 at 09:39 #36941 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘Disconnect between Map and Members’ is closed to new replies.