The workaround appears to be to draw, e.g. a point on the map, at which point it will save okay. This is however, more of a problem for my users who want to import Neatline items via CSV.
On investigation it appears that Mysql 5.6.27 the expression GeomFromText('') returns NULL, whereas on 5.7.10 it throws ERROR 3037 (22023): Invalid GIS data provided to function st_geometryfromtext instead.
I have temporarily hacked my instance of the plugin to fix this my changing nl_setGeometry in helpers/Mysql.php like so:
function nl_setGeometry($coverage)
{
$coverage_or_default = $coverage ?: "POINT(0 0)";
return new Zend_Db_Expr("COALESCE(
GeomFromText('{$coverage_or_default}'), GeomFromText('POINT(0 0)')
)");
}
This will still fail with invalid geometry (and the user won't know why) so I'm sure there's a better solution.
Using Neatline 2.5.1 with Omeka 2.3.1 on Mysql 5.7.10 and am unable to save a Neatline item unless I have added geometry. My logs show this error:
The workaround appears to be to draw, e.g. a point on the map, at which point it will save okay. This is however, more of a problem for my users who want to import Neatline items via CSV.
On investigation it appears that Mysql 5.6.27 the expression
GeomFromText('')
returns NULL, whereas on 5.7.10 it throwsERROR 3037 (22023): Invalid GIS data provided to function st_geometryfromtext
instead.I have temporarily hacked my instance of the plugin to fix this my changing
nl_setGeometry
inhelpers/Mysql.php
like so:This will still fail with invalid geometry (and the user won't know why) so I'm sure there's a better solution.