owncloud-archive / maps

:globe_with_meridians: Maps app for ownCloud
GNU Affero General Public License v3.0
42 stars 20 forks source link

Search doesn’t work at the moment #21

Closed jancborchardt closed 8 years ago

jancborchardt commented 10 years ago

When searching for »Berlin«, I get:

GET apps/maps/search?search=Berlin&bbox=[…] 500 (Internal Server Error)
    mapSearch.getSearchResults script.js line 337
    (anonymous function) script.js line 272

@brantje

brantje commented 10 years ago

What is in the owncloud.log?

jancborchardt commented 10 years ago

A whole bunch of stuff, but mostly probably a table is missing?


"app":"index","message":"DatabaseException: An exception occurred while executing 'SELECT * from \"oc_maps_adress_cache\" where adres_hash=?':\n\nSQLSTATE[HY000]: General error: 1 no such table: oc_maps_adress_cache","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #1 \/home\/jan\/owncloud\/lib\/private\/appframework\/db\/db.php(43): OCP\\DB::prepare('SELECT * from `...', NULL, NULL)","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #2 \/home\/jan\/owncloud\/apps\/maps\/db\/cachemanager.php(39): OC\\AppFramework\\Db\\Db->prepareQuery('SELECT * from `...')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #3 \/home\/jan\/owncloud\/apps\/maps\/controller\/pagecontroller.php(179): OCA\\Maps\\Db\\CacheManager->check('cbf6aebb7c36953...')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #4 \/home\/jan\/owncloud\/apps\/maps\/controller\/pagecontroller.php(159): OCA\\Maps\\Controller\\PageController->checkGeoCache('cbf6aebb7c36953...')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #5 \/home\/jan\/owncloud\/apps\/maps\/controller\/pagecontroller.php(95): OCA\\Maps\\Controller\\PageController->doAdresslookup('\/ Canada,Berlin')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #6 [internal function]: OCA\\Maps\\Controller\\PageController->search()","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #7 \/home\/jan\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(155): call_user_func_array(Array, Array)","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #8 \/home\/jan\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(84): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Maps\\Controller\\PageController), 'search')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #9 \/home\/jan\/owncloud\/lib\/private\/appframework\/app.php(57): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Maps\\Controller\\PageController), 'search')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #10 \/home\/jan\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(44): OC\\AppFramework\\App::main('PageController', 'search', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #11 [internal function]: OC\\AppFramework\\routing\\RouteActionHandler->__invoke(Array)","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #12 \/home\/jan\/owncloud\/lib\/private\/route\/router.php(227): call_user_func(Object(OC\\AppFramework\\routing\\RouteActionHandler), Array)","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #13 \/home\/jan\/owncloud\/lib\/base.php(721): OC\\Route\\Router->match('\/apps\/maps\/sear...')","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #14 \/home\/jan\/owncloud\/index.php(28): OC::handleRequest()","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
"app":"index","message":"Exception: #15 {main}","level":4,"time":"2014-08-25T22:02:33+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=[…]"}
brantje commented 10 years ago

Fixed

jancborchardt commented 10 years ago

Now getting this error:

"app":"PHP","message":"Attempt to assign property of non-object at \/home\/jan\/owncloud\/apps\/maps\/controller\/pagecontroller.php#97","level":0,"time":"2014-08-26T22:44:13+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin
"app":"PHP","message":"Attempt to assign property of non-object at \/home\/jan\/owncloud\/apps\/maps\/controller\/pagecontroller.php#177","level":0,"time":"2014-08-26T22:44:13+00:00","method":"GET","url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin
jancborchardt commented 10 years ago

And in the browser console is spammed with some logs:

Object { contacts: Array[1], nodes: Array[0], addresses: Array[10] } script.js:353
brantje commented 10 years ago

That is normal. The php error will be fixed =)

DJaeger commented 9 years ago

@brantje: Have you fixed this? If not, would you share your findings, that someone else can fix?

v1r0x commented 9 years ago

Is this still present? I don't get any errors.

jancborchardt commented 9 years ago

Search still doesn’t really work. No suggestions are shown, the log says:

Object { contacts: Array[17], nodes: Array[0], addresses: Array[10] } script.js:449:4

And in the owncloud.log:

Attempt to assign property of non-object at \/home\/jan\/owncloud\/apps\/maps\/controller\/pagecontroller.php#194"
"url":"\/owncloud\/index.php\/apps\/maps\/search?search=Berlin&bbox=13.449797630310059%2C52.50692273870633%2C13.480696678161621%2C52.52269704703951
v1r0x commented 9 years ago

Suggestions never worked for me. Normal search with searching on pressing return/enter worked. I'm currently trying to integrate the search bar into the map (using a new version of (I think) the one which should show suggestions right now) and add the functionality of #8 to it. Maybe this could solve all search related issues

jancborchardt commented 9 years ago

Cool! Yeah, that would probably work.

v1r0x commented 9 years ago

the current status is in the testing branch of my fork. If you have the time, you could have a look at it.

jancborchardt commented 9 years ago

@v1r0x if you just submit a pull request for that, it’s easier to test, review and then merge. :)

v1r0x commented 9 years ago

@jancborchardt will do that after my holiday. The branch was for @Henni , because I have a weird problem (function only called if there is an alert()). I just told you, if you want to have a look at the current progress ;)

DJaeger commented 9 years ago

Any news or still at holdidays? ;-)

v1r0x commented 9 years ago

No, back from my holiday...sadly :D I think I should talk to @Henni or someone else who is interested to figure out the problem. I set up a local test environment on my laptop, which should be easier to debug. Currently I have a side project, associated with OSM/OC Maps, so I don't work 100% on maps itself, but I will definitely finish this soon ;)

v1r0x commented 9 years ago

Still haven't found the problem...If anyone is interested or has an idea: https://github.com/v1r0x/maps/tree/testing (https://github.com/v1r0x/maps/blob/testing/js/3rdparty/leaflet/lib/Control.Geocoder.js#L307)

jancborchardt commented 8 years ago

This seems to be resolved, and only #38 (zooming in on the best result) remains.