At least from what I can see, https://freegeoip.app/json/ which is the tool we’re using to retrieve the information, is still running and not charging.
If you visit that url yourself directly, you should see your own data based on your current IP address. That said, it’s possible that either you don’t have an IP address provided for the user, perhaps something is blocking the communication between the your site and the service, or something else.
What’s it saying in place of where the geolocation data was originally saying?
It just shows their IP Address. It doesn’t have the city on top of it anymore. Before it would have the city as well as the IP.
Here is a screenshot
https://imgur.com/XBVDqj4
If it’s just showing the IP address, that means that there’s an error occurring when trying to fetch the results of wp_remote_get( 'https://freegeoip.app/json/' . $userip );
with $userip being the actual IP address saved for the pending user. Something is going on with your attempts to fetch the data, and it’s not returning what we’d expect.
And how would we go about fixing that?
I don’t have any immediate answer for that outside of trying to get the error message for the occurring error. If you’re willing to manually edit the plugin’s code temporarily, I can provide some things to add to see what’s going on.
We would very likely make use of the wp_remote_retrieve_response_message
function to help debug this case.
Okay I’m willing to edit the plugin’s code. Just tell me what to do please.
Inside your includes/admin.php file, you should see a function declaration for bp_registration_options_ip_data
around line 1059. Further down on line 1084, there’s a line of code that should be echo wpautop( $userip );
.
either above or below that, it doesn’t matter, add in this line:
echo wp_remote_retrieve_response_message( $response );
It should look something like this overall:
} else {
echo wp_remote_retrieve_response_message( $response );
echo wpautop( $userip );
} ?>
Once done and saved, refresh the pending users page, and the response message should be getting shown alongside the IP address. Provide that error text, and I can provide more information.
Edit: used the wrong function. Please make sure you refresh and have latest version of response
Okay I added the function but it’s still not working
https://imgur.com/mT6Lsjl
What do you see when you go to the admin page that lists the pending members?
alright, we’ll go the more aggressive route for this one.
} else {
var_dump( $response );
echo wpautop( $userip );
} ?>
then refresh the admin page and screenshot or copy/paste the text.
That did something. Here’s what I got
https://imgur.com/478zI2i
Much better, this is the relevant part:
cURL error 35: openSSL SSL_connect: SSL_ERROR_SYSCALL in connection to freegeoip.app:443
Sounds like issues with SSL and cURL on the server for your hosting.
Not guaranteed to provide a solution, but it is a link I found from searching “cURL error 35: openSSL SSL_connect: SSL_ERROR_SYSCALL”
https://stackoverflow.com/questions/31183297/ssl-connect-fails-with-ssl-error-syscall-error/31183611#31183611
May be worth reaching out to your hosting as well to see what they have to say on the topic.
I checked with my host and they are saying the issue is with freeoip.app.
From them:
“Thank you for contacting us. We have checked your server and could not find any issues. when tried to check curl connection to freegeoip.app we received below error:
curl freegeoip.app:443
curl: (56) Recv failure: Connection reset by peer
Looks like there is an issue with freegeoip.app”
Hmm…some aspect of the communication between your server and theirs isn’t liking each other. There’s not really anything I’m going to be able to do on my end from the plugin perspective.