Fatal error: Class 'Point' not found in C:\wamp\www\test\sites\all\modules\geocoder\plugins\geocoder_handler\google.inc on line 57

This when creating node. It is possible that it is misconfiguration, since documentation is missing.

CommentFileSizeAuthor
#8 1477238-8-geophp-replace_submodule.patch282.23 KBpfrenssen

Comments

henrijs.seso’s picture

Title: Fatal error, Class 'Point' not found » Fatal error: Class 'Point' not found

Ahh, this not true "In the latest development snapshot, all you need to do is install the geoPHP module". You need to download geoPHP and put inside geoPHP module directory too.

michaelfavia’s picture

Exactly. We are going to need to add a notification to prevent this issue on upgrade because dependencies arent enforced on upgrade.

Would you suggest a drupal_set_message() on update.php or a notice in the requirements section? Maybe a notice on entity save is !class_exists()?

henrijs.seso’s picture

I am not sure how to warn users, but better explanation on module page would be welcome. Also, it would be better to keep geoPHP in libraries. If geoPHP is kept in module directory, you might as well actually bundle it with module.

phayes’s picture

The geoPHP library is already bundled with the geoPHP module. So there is no longer any need to manually put anything anywhere. Yeah, we should at least put up a big warning on the project page. It might also make sense to add an hook_upgrade_N that just displays instructions or something....

henrijs.seso’s picture

It was not when I downloaded -dev version (and even now geoPHP it is not bundled with geoPHP module -1.0 and -dev), if it would be really bundled, this would be no issue anymore.

phayes’s picture

Oh weird. You are right. It's missing. I wonder if it was a bad push or something

phayes’s picture

Project: Geocoder » geoPHP
pfrenssen’s picture

Status: Active » Needs review
StatusFileSize
new282.23 KB

The GeoPHP library was accidentally installed as a git submodule. This does not include the actual sources but references the original repository. The user would need to do a git submodule init to retrieve the library. Currently git will ignore all code that is put in the geoPHP folder since it assumes these are version controlled by the submodule. You can remedy this situation with git rm --cached geoPHP.

If you like to check out the latest release from a git repository such as GitHub this problem can be avoided in the future by simply deleting the .git folder inside the geoPHP folder before committing.

I have attached a patch that removes the submodule and replaces it with the latest stable 0.7 release of geoPHP. Patch can be applied with git am.

phayes’s picture

Status: Needs review » Fixed

Commited. Thanks

Sebbon’s picture

Hi, thanks for the fixes. I ran into the same problems with " Point not found" for a new project we're working on. However, I have one thing to ask.

I'm using the modules GeoField, Geocoder and GeoPHP. Now, for GeoPHP I need to place the geoPHP library files in the geoPHP module folder /geoPHP. But for Geofield I need to put this in the libraries folder as would be expected. So now we've got geoPHP on two locations?!

Am I missing something or is this the way to go now? Seems a bit weird to have it in two places..

pfrenssen’s picture

@Sebbon, it should not be needed to install the same library twice. If you already have GeoPHP installed in the libraries/ folder then you don't need this module.

phayes’s picture

Hi Sebbon,

Right now we are a bit in-between things. geocoder expects to use geoPHP module, where geofield is still on the old system of using libraries module and manually downloading geoPHP. Eventually we will move everything to using the geoPHP module (no more libraries module and manual downloads). There is an issue open on the goefield project here: #1466210: Depend on geoPHP module .

So yes, currently you will have geoPHP in two places. It's kind of lame, but also a temporary situation.

Status: Fixed » Closed (fixed)

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