get this error when i try to flush the cache Fatal error: Call to undefined function geofield_proximity_views_handlers() in sites/all/modules/geofield/views/handlers/geofield_handler_filter.inc on line 108

Comments

FranciscoLuz’s picture

Same error here. In my case I don't get it when clearing the cache but when for instance deleting a field from a drupal commerce product type or when trying to change the product type name.

A temporary fix is to add

<?php
$path = drupal_get_path('module', 'geofield');
require_once DRUPAL_ROOT . "/$path/views/geofield.views.inc";
?>

at the beginning of geofield/views/handlers/geofield_handler_filter.inc

Brandonian’s picture

I can't replicate this issue locally. However, what's even odder about this is that AKAIK, if the filter file is being included, then our views file *should* also be included, and I'm not sure in what scenario Geofield's base views file isn't loaded before an individual filter file.

FranciscoLuz’s picture

To replicate it try to install the commerce kickstart then add a geofield to a product content type.

After that go to product types configuration under store and rename the product type that comes with it. Still at the product type, add and delete any kind of field there ( not necessary a geofield, do it with any field as long as a geofield is attached to the product content type which acts as a product display ).

I am pretty sure you will get the missing function error.

funature’s picture

@FranciscoLuz your temporary fix didn't work for me, after adding your code, i got this
Fatal error: Class 'geofieldProximityManual' not found in /sites/all/modules/geofield/views/handlers/geofield_handler_filter.inc on line 112

FranciscoLuz’s picture

@euroba

Note that the error you are reporting on #4 is of the same nature but a different issue. The hack code I proposed on #1 could not cause that and unless you are still getting the original error message the hacking code has indeed fixed it.

Apparently, for some obscure reason, the file sites/all/modules/geofield/views/proximity_plugins/geofieldProximityManual.inc also has failed to be included in your case.

Try clearing your cache, check the "Status Report"

dan_lennox’s picture

Clearing the cache fixed this issue for me.

dan_lennox’s picture

Apologies disregard above comment. I can still duplicate this when saving various forms as mentioned in #3.

josefg’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev

I can confirm that this bug still exists, and that the workaround at #1 worked for me. Using the OpenOutreach distribution, RC10.

josefg’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha2

Sorry, didn't mean to change the version of the bug report. But OpenOutreach RC10 claims to be using the 7.x+2.x-dev version of the Geofield module.

wrd’s picture

Same problem with 7.x-2.x-dev downloaded this morning. Workaround in #1 works for me.

Wayne Riesterer’s picture

I installed Geofield 7.x-2.x-dev this morning and had the same issue only after configuration changes (sorry, I don't know what I changed to cause the error).

#1: Francisco's fix worked in my case.