Hi,

I got the following error when moving this module to a subfolder in sites/all/modules, even after using Registry Rebuild. It might be preferable to use module_load_include() instead of require_once or include statements, as described here.

[17-Sep-2013 16:59:17 UTC] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'geofield.widgets.inc' (include_path='.:/Applications/MAMP/bin/php/php5.3.14/lib/php') in /path/to/drupal/sites/all/modules/geofield/geofield.module on line 3
No such file, line 8 of
/path/to/drupal/sites/all/modules/geocoder/geocoder.module
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alberto56’s picture

Status: Active » Needs review
FileSize
595 bytes

Here is a patch that does this.

gmclelland’s picture

Version: 7.x-1.1 » 7.x-2.x-dev
Issue summary: View changes
FileSize
1.52 KB

I haven't tested the patch in #1 yet, but the code looks correct.

Here is some more background reading:
http://buildamodule.com/blog/the-correct-way-to-include-files-in-your-dr...
https://api.drupal.org/api/drupal/includes%21module.inc/function/module_...

Here is the patch for the 2.x-dev

The patch in #1 is for the 1.x-dev

bneil’s picture

Status: Needs review » Reviewed & tested by the community

I've manually tested the patch in #2 without issue.

Brandonian’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch @gmclelland! Committed.

http://drupalcode.org/project/geofield.git/commit/3116ca0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.