Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: jonloh as a volunteer 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 CreditAttribution: cutmedia commentedthis worked for me, also the blank list breaks integration with Context GeoIP see related issue
Comment #4
HansKuiters CreditAttribution: HansKuiters commentedWorks fine, thank you.
Comment #6
das-peter CreditAttribution: das-peter at Cando commentedLooks good - thanks all for the work.
Patched and pushed :)