The combination of the Context GeoIP 7.x-1.x-dev (2013-Sep-30) and GeIP API 7.x-1.x-dev (2013-Sep-30) modules works well.
However, when the Context GeoIP module is used with the new version of GeoIP API (7.x-2.0-beta1, 2014-Oct-30), any attempt to edit existing contexts or to create new contexts leads to an 500 internal server error.
The apache error log shows the following:
[Thu Jan 07 15:07:56.866915 2016] [:error] [pid 31786] [client xxx.xxx.xxx.xxx:52755] PHP Fatal error: Call to undefined function geoip_country_values() in /var/www/www.some-site.com/sites/all/modules/context_geoip/context_geoip_conditio... on line 10, referer: http://www.some-site.com/admin/structure/context
Although I am not certain, errors disappear if the Context GeoIP module is disabled, so assuming this module is the trigger.
Anyone else seeing this?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | context_geoip-geoip-country-values-callback-2645768-4.patch | 525 bytes | Koen.Pasman |
Comments
Comment #2
ilfelice commentedComment #3
cutmedia commentedI had the same issue with GeoIP 2.0, fatal error on all Contexts which made the site unusable.
The fix for me was to apply this patch on GeoIP:
https://www.drupal.org/node/2671242
Then edit context_geoip_condition.inc on line 10, change this
foreach (geoip_country_values() as $country_code => $country_name) {to
foreach (geoip_countries_list() as $country_code => $country_name) {hope this helps
Comment #4
Koen.Pasman commentedAs cutmedia states, use the patch for geoip in https://www.drupal.org/node/2671242 and the patch I just attached.