When I create a rule with the condition "Check for user country detected by ip", the list is blank.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonloh created an issue. See original summary.

jonloh’s picture

Status: Active » Needs review
FileSize
943 bytes

Upon checking through the code, the condition is calling the Drupal's built-in country_get_list function - https://api.drupal.org/api/drupal/includes%21locale.inc/function/country...

But since it requires to include_once locale.inc file, I believe it's better to create as a separate function itself in geoip to do the necessary function calls and return the country list.

The patch attached should fix this. Hopefully it's the right way to do so.

cutmedia’s picture

this worked for me, also the blank list breaks integration with Context GeoIP see related issue

HansKuiters’s picture

Status: Needs review » Reviewed & tested by the community

Works fine, thank you.

  • das-peter committed 8f712f5 on 7.x-2.x authored by jonloh
    Issue #2671242 by jonloh, cutmedia, HansKuiters: Rules condition "Check...
das-peter’s picture

Status: Reviewed & tested by the community » Fixed

Looks good - thanks all for the work.
Patched and pushed :)

Status: Fixed » Closed (fixed)

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