owncloud-archive / maps

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

Error on trying to save as favorite #87

Closed jancborchardt closed 8 years ago

jancborchardt commented 8 years ago

Saving as favorite doesn’t work for me. I get this error:

{"reqId":"++AnUKFNbIL9zHRx0eVV","remoteAddr":"127.0.0.1","app":"index","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\TableNotFoundException\",\"Message\":\"An exception occurred while executing 'INSERT INTO \\\"oc_maps_favorites\\\"(\\\"name\\\",\\\"timestamp\\\",\\\"user_id\\\",\\\"lat\\\",\\\"lng\\\") VALUES(?,?,?,?,?)':\\n\\nSQLSTATE[HY000]: General error: 1 no such table: oc_maps_favorites\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/jan\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/home\\\/jan\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(785): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOSqlite\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'INSERT INTO \\\"oc...')\\n#2 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(160): Doctrine\\\\DBAL\\\\Connection->prepare('INSERT INTO \\\"oc...')\\n#3 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/db\\\/db.php(68): OC\\\\DB\\\\Connection->prepare('INSERT INTO `*P...', NULL, NULL)\\n#4 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/public\\\/appframework\\\/db\\\/mapper.php(231): OC\\\\AppFramework\\\\Db\\\\Db->prepareQuery('INSERT INTO `*P...', NULL, NULL)\\n#5 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/public\\\/appframework\\\/db\\\/mapper.php(124): OCP\\\\AppFramework\\\\Db\\\\Mapper->execute('INSERT INTO `*P...', Array)\\n#6 \\\/home\\\/jan\\\/owncloud\\\/apps\\\/maps\\\/controller\\\/favoritecontroller.php(88): OCP\\\\AppFramework\\\\Db\\\\Mapper->insert(Object(OCA\\\\Maps\\\\Db\\\\Favorite))\\n#7 [internal function]: OCA\\\\Maps\\\\Controller\\\\FavoriteController->addFavorite('32.054899298185...', '34.760913848876...')\\n#8 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(159): call_user_func_array(Array, Array)\\n#9 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Maps\\\\Controller\\\\FavoriteController), 'addFavorite')\\n#10 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(108): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Maps\\\\Controller\\\\FavoriteController), 'addFavorite')\\n#11 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('FavoriteControl...', 'addFavorite', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#12 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#13 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(297): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#14 \\\/home\\\/jan\\\/owncloud\\\/lib\\\/base.php(866): OC\\\\Route\\\\Router->match('\\\/apps\\\/maps\\\/api\\\/...')\\n#15 \\\/home\\\/jan\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#16 {main}\",\"File\":\"\\\/home\\\/jan\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractSQLiteDriver.php\",\"Line\":58}","level":3,"time":"2015-12-02T16:05:54+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/maps\/api\/1.0\/favorite\/addToFavorites"}
Henni commented 8 years ago

This might happen because the table structure is only updated when the app version increases (but I'm not completely familiar with how owncloud handles this). Please try reenabling / reinstalling the app.

jancborchardt commented 8 years ago

Now it works, thanks! :)