Closed mjlassila closed 9 years ago
I went through recent Zend Framework changelogs and it seems that in Zend 1.12.8 there were relevant changes in Zend DB layer. (https://github.com/zendframework/zf1/pull/418). I got this fixed by using Zend_Db_Expr when constructing SQL query for location search (https://github.com/mjlassila/plugin-Geolocation/blob/master/GeolocationPlugin.php#L291).
Yeah, the changes to expression handling have bit some other plugins before, but nobody had reported it on this one yet.
What's curious to me here is that you report the search works fine from the map page. Does that include the proximity search, or just other searches?
Tested this once more and actually the proximity search in admin/geolocation/map/browse doesn't work correctly. Searching doesn't give the database error, but at the same time the map doesn't display hits even though the page title indicates that there are matching items.
It seems really strange that the search works at all because admin map search uses the same code as the public search view :confused:
With your changed code are the results correct in the "regular" search, the map search, on admin and public?
If its the expression/parens problem, which it would make sense to be, then that change should fix the issue everywhere.
Changed code fixes the problem everywhere. The reason I'm confused was that the unpatched code worked at all but nevertheless, now it works.
Can you make a pull request containing your change?
It seems impossible to make a pull request from a repo which is not a direct fork but here's a diff: https://github.com/mjlassila/plugin-Geolocation/commit/d37bb63f6c01e5eea25d2ebcab9f7c67992acd34.diff
Okay, I pulled in your change from your repository
Search using address proximity (in /items/browse) gives the following error in Omeka 2.3.1 when using the current version (master branch) of the plugin. In the admin map browse view (admin/geolocation/map/browse?) search works normally.
With Omeka 2.2.2 and the same version of plugin there's no error so it seems that the error is somehow related to recent changes in Omeka core.