Problem/Motivation
When an user are being register and the Social GeoLocation module is enable, sometimes an unexpected error happen and registration stop.
The Social GeoLocation module get localtion using Nominatim and when it has any unavailability, the error happen.
Steps to reproduce
To reproduce the error, we need to force the error, because it only happen when the Nominatim has unavailability.
- Replace code at: '/modules/geolocation_leaflet/src/Plugin/geolocation/Geocoder/Nominatim.php:36' with code below
- Enable Social Geo Location
- Logged with Site Manager user
- Create an user using page: /admin/people/create
- An unexpected error will broken the register page
$request_url_base = 'https://httpstat.us/200';
$url = Url::fromUri($request_url_base . '/search?q=' . $address, [
'query' => [
'sleep' => 50000,
'email' => $this->getRequestEmail(),
'limit' => 1,
'format' => 'json',
'connect_timeout' => 5,
],
]);
Proposed resolution
The Geo Location isn't be mandatory and can't broken the register, so add a treatment to return a warning message to inform the user about empty location and continue with registration.
Remaining tasks
N/A
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Issue fork social_geolocation-3462149
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
viniciusrp commentedComment #5
robertragas commentedI approved and merged it.
Comment #7
robertragas commentedLanding in 3.0.4 and 2.5.3
Comment #8
robertragas commented