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

Command icon 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

viniciusrp created an issue. See original summary.

viniciusrp’s picture

Status: Active » Needs review

  • viniciusrp committed 535e7673 on 3.0.x
    Issue #3462149 by viniciusrp: Timeout to get location using Social...
robertragas’s picture

Status: Needs review » Reviewed & tested by the community

I approved and merged it.

robertragas’s picture

Landing in 3.0.4 and 2.5.3

robertragas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.