When I create a rule with the condition "Check for user country detected by ip", the list is blank.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | geoip-rules-condition-country-not-listing-2671242-2-7.x.patch | 943 bytes | jonloh |
When I create a rule with the condition "Check for user country detected by ip", the list is blank.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | geoip-rules-condition-country-not-listing-2671242-2-7.x.patch | 943 bytes | jonloh |
Comments
Comment #2
jonloh commentedUpon 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.
Comment #3
cutmedia commentedthis worked for me, also the blank list breaks integration with Context GeoIP see related issue
Comment #4
hanskuiters commentedWorks fine, thank you.
Comment #6
das-peter commentedLooks good - thanks all for the work.
Patched and pushed :)