6.0.0-beta1
7/4/25

[#10616] datatype mismatch in geolocation DB query
Summary datatype mismatch in geolocation DB query
Queue Ansel
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester thpo+horde (at) dotrc (dot) de
Created 10/07/2011 (5019 days ago)
Due
Updated 10/11/2011 (5015 days ago)
Assigned 10/11/2011 (5015 days ago)
Resolved 10/11/2011 (5015 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/11/2011 08:12:48 AM Jan Schneider State ⇒ Resolved
 
10/11/2011 08:12:25 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Apply fix for bug #10616 here too.

  1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/ffeb39a26a46b557f7c4e3ca1c3cd6627bf27f93
10/11/2011 05:20:56 AM thpo+horde (at) dotrc (dot) de Comment #4 Reply to this comment
Try now?
Almost. ;-)
Could you apply the same patch one function further down as well? Then 
it works like a charm.

Thanks.
10/11/2011 12:27:30 AM Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
Try now?
10/11/2011 12:26:54 AM Git Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

Fix comparison operator for latitude field.
Bug: 10616

  1 files changed, 2 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/2fd85c33913c22b7307727bde1949fa74f78464f
10/10/2011 04:42:35 PM Jan Schneider State ⇒ Assigned
Assigned to Michael Rubinsky
 
10/07/2011 04:18:05 PM thpo+horde (at) dotrc (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ datatype mismatch in geolocation DB query
Queue ⇒ Ansel
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
There is a problem with the datatypes uses in a query, which 
postgresql complains about:

A fatal error has occurred
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: 
character varying > integer LINE 1: ..._location FROM ansel_images 
WHERE image_latitude > 0 AND im... ^ HINT: No operator matches the 
given name and argument type(s). You might need to add explicit type 
casts.

1. Ansel_View_Gallery->html() /srv/horde4/ansel/view.php:56
2. Ansel_View_GalleryRenderer_Gallery->html() 
/srv/horde4/ansel/lib/View/Gallery.php:132
3. include() /srv/horde4/ansel/lib/View/GalleryRenderer/Gallery.php:131
4. Ansel_View_Ansel->renderWidgets() 
/srv/horde4/ansel/templates/view/gallery.inc:170
5. Ansel_View_Ansel->_renderWidgets() /srv/horde4/ansel/lib/View/Ansel.php:55
6. Ansel_Widget_Geotag->html() /srv/horde4/ansel/lib/View/Ansel.php:77
7. Ansel_Storage->getImagesGeodata() 
/srv/horde4/ansel/lib/Widget/Geotag.php:74
8. Ansel_Storage->listImages() /srv/horde4/ansel/lib/Storage.php:1151

Details
The full error message is logged in Horde's log file, and is shown 
below only to administrators. Non-administrative users will not see 
error details.

Ansel_Exception Object
(
     [details] =>
     [message:protected] => SQLSTATE[42883]: Undefined function: 7 
ERROR:  operator does not exist: character varying > integer
LINE 1: ..._location FROM ansel_images  WHERE image_latitude > 0 AND im...
                                                              ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.
     [string:Exception:private] =>
     [code:protected] => 42883
     [file:protected] => /srv/horde4/ansel/lib/Storage.php
     [line:protected] => 1108
     [trace:Exception:private] => Array
         (
             [0] => Array
                 (
                     [file] => /srv/horde4/ansel/lib/Storage.php
                     [line] => 1151
                     [function] => listImages
                     [class] => Ansel_Storage
                     [type] => ->
                     [args] => Array
                         (
                             [0] => Array
                                 (
                                     [fields] => Array
                                         (
                                             [0] => image_id as id
                                             [1] => image_id
                                             [2] => image_latitude
                                             [3] => image_longitude
                                             [4] => image_location
                                         )

                                     [filter] => Array
                                         (
                                             [0] => Array
                                                 (
                                                     [property] => latitude
                                                     [op] => >
                                                     [value] => 0
                                                 )

                                             [1] => Array
                                                 (
                                                     [property] => id
                                                     [op] => IN
                                                     [value] => Array
                                                         (
                                                             [0] => 2
                                                             [1] => 3
                                                         )

                                                 )

                                         )

                                 )

                         )

                 )

             [1] => Array
                 (
                     [file] => /srv/horde4/ansel/lib/Widget/Geotag.php
                     [line] => 74
                     [function] => getImagesGeodata
                     [class] => Ansel_Storage
                     [type] => ->
                     [args] => Array
                         (
                             [0] => Array
                                 (
                                     [0] => 2
                                     [1] => 3
                                 )

                         )

                 )

             [2] => Array
                 (
                     [file] => /srv/horde4/ansel/lib/View/Ansel.php
                     [line] => 77
                     [function] => html
                     [class] => Ansel_Widget_Geotag
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [3] => Array
                 (
                     [file] => /srv/horde4/ansel/lib/View/Ansel.php
                     [line] => 55
                     [function] => _renderWidgets
                     [class] => Ansel_View_Ansel
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [4] => Array
                 (
                     [file] => /srv/horde4/ansel/templates/view/gallery.inc
                     [line] => 170
                     [function] => renderWidgets
                     [class] => Ansel_View_Ansel
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [5] => Array
                 (
                     [file] => 
/srv/horde4/ansel/lib/View/GalleryRenderer/Gallery.php
                     [line] => 131
                     [args] => Array
                         (
                             [0] => 
/srv/horde4/ansel/templates/view/gallery.inc
                         )

                     [function] => include
                 )

             [6] => Array
                 (
                     [file] => /srv/horde4/ansel/lib/View/Gallery.php
                     [line] => 132
                     [function] => html
                     [class] => Ansel_View_GalleryRenderer_Gallery
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [7] => Array
                 (
                     [file] => /srv/horde4/ansel/view.php
                     [line] => 56
                     [function] => html
                     [class] => Ansel_View_Gallery
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

         )

Saved Queries