Hi Patrick!
I seem to be getting an odd error when I run cron, I have isolated it away from my custom modules as the error occurs before my cron hooks, but dont know where to go to figure it out:

Exception: ParseException: Expected word but encountered end of stream in GEOSWKTReader->read() (line 38 of /home/sparcsadmin/drupal7/sites/all/modules/geophp/geoPHP/lib/adapters/WKT.class.php).

I am using geoPHP 7.x-1.6+2-dev (2012-Sep-05)
Any thoughts on what Im doing wrong?
Franco

Comments

phayes’s picture

Could you tell me what it's trying to parse? Can you capture what's being passed to $read ?

dscutaru’s picture

I have something similar, but on node page, the string passed to read is an empty string. Actually, because of this error some nodes cannot be displayed.
Nodes have a geofield, and those throwing exception contain the following field:

field_coordinates (Array, 1 element) 
und (Array, 1 element) 
  0 (Array, 11 elements) 
    wkt (NULL) 
    geo_type (NULL) 
    lat (NULL) 
    lon (NULL) 
    left (NULL) 
    top (NULL) 
    right (NULL) 
    bottom (NULL) 
    srid (NULL) 
    accuracy (NULL) 
    source (NULL)

I assume this field doesn't contain what it should, because node was created by feeds after importing an CSV file, and that is causing the error.

To fix I added in the geofield_map.module, function geofield_map_field_formatter_view, on line 62
if (empty($item['wkt'])) continue;

So the code looks like

foreach ($items as $item) {
    if (empty($item['wkt'])) continue;
    $geometry = geoPHP::load($item['wkt'], 'wkt');
    ...
  }
spydmobile’s picture

Sorry patrick, (and @dscutaru) but I have been away on medical and while I was gone the Virtual Machine having this problem was rebuilt from the ground up and I am not seeing this in the new one. I will keep my eyes open and if it resurfaces I will post again.
Franco

dscutaru’s picture

Wow, so quick, I didn't even manage to edit my post...
I'm glad you are better !

Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Active » Closed (outdated)