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?

Comments

jorgemare created an issue. See original summary.

ilfelice’s picture

Issue summary: View changes
cutmedia’s picture

I 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

Koen.Pasman’s picture

Status: Active » Needs review
StatusFileSize
new525 bytes

As cutmedia states, use the patch for geoip in https://www.drupal.org/node/2671242 and the patch I just attached.