Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Failed update: QueryException error

Toprak Emre   ( User )

Commented 6 years ago

Looks like the latest update failed and I'm now getting the following error after logging in.


(3/3) QueryException


SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ting_bills.category_id' in 'where clause' (SQL: select * from `ting_bills` where `ting_bills`.`category_id` in (2, 3, 4, 6) and `ting_bills`.`deleted_at` is null and `ting_bills`.`company_id` = 1)


Any ideas on how to fix this?

Denis Dulici   ( Admin )

Commented 6 years ago

What did you get during the update process?


You can try to download the version you were using before the update and upload its files:


https://github.com/akaunting/akaunting/releases

Toprak Emre   ( User )

Commented 6 years ago

Just the generic "Whoops, looks like something went wrong." message. I've seen this error after previous updates as well, but Akaunting worked fine until the latest update.


Reuploading files didn't help, unfortunately. I'm still getting the same error.

Sebastian Di Luise   ( User )

Commented 6 years ago

You can try to enable debug so Whoops will give you some extra data (not just generic Whoops)


Here is how to: https://akaunting.com/docs/developer-manual/debug

Toprak Emre   ( User )

Commented 6 years ago

Here's the full output:


 







(2/3) PDOException

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ting_bills.category_id' in 'where clause'







in PDOConnection.php line 79


at PDOConnection->prepare('select * from `ting_bills` where `ting_bills`.`category_id` in (?, ?, ?, ?) and `ting_bills`.`deleted_at` is null and `ting_bills`.`company_id` = ?')in Connection.php line 319


at Connection->Illuminate\Database\{closure}('select * from `ting_bills` where `ting_bills`.`category_id` in (?, ?, ?, ?) and `ting_bills`.`deleted_at` is null and `ting_bills`.`company_id` = ?', array(2, 3, 4, 6, 1))in Connection.php line 640


at Connection->runQueryCallback('select * from `ting_bills` where `ting_bills`.`category_id` in (?, ?, ?, ?) and `ting_bills`.`deleted_at` is null and `ting_bills`.`company_id` = ?', array(2, 3, 4, 6, 1), object(Closure))in Connection.php line 607


at Connection->run('select * from `ting_bills` where `ting_bills`.`category_id` in (?, ?, ?, ?) and `ting_bills`.`deleted_at` is null and `ting_bills`.`company_id` = ?', array(2, 3, 4, 6, 1), object(Closure))in Connection.php line 326


at Connection->select('select * from `ting_bills` where `ting_bills`.`category_id` in (?, ?, ?, ?) and `ting_bills`.`deleted_at` is null and `ting_bills`.`company_id` = ?', array(2, 3, 4, 6, 1), true)in Builder.php line 1705


at Builder->runSelect()in Builder.php line 1690


at Builder->get(array('*'))in Builder.php line 462


at Builder->getModels(array('*'))in Builder.php line 446


at Builder->get(array('*'))in Builder.php line 58


at Builder->get()


at call_user_func_array(array(object(Builder), 'get'), array())in Relation.php line 356


at Relation->__call('get', array())in Relation.php line 143


at Relation->getEager()in Builder.php line 510


at Builder->eagerLoadRelation(array(object(Category), object(Category), object(Category), object(Category)), 'bills', object(Closure))in Builder.php line 479


at Builder->eagerLoadRelations(array(object(Category), object(Category), object(Category), object(Category)))in Builder.php line 447


at Builder->get()in Dashboard.php line 250


at Dashboard->calculateAmounts()in Dashboard.php line 75


at Dashboard->getTotals()in Dashboard.php line 37


at Dashboard->index()


at call_user_func_array(array(object(Dashboard), 'index'), array())in Controller.php line 55


at Controller->callAction('index', array())in ControllerDispatcher.php line 44


at ControllerDispatcher->dispatch(object(Route), object(Dashboard), 'index')in Route.php line 203


at Route->runController()in Route.php line 160


at Route->run()in Router.php line 572


at Router->Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 30


at Pipeline->Illuminate\Routing\{closure}(object(Request))in LaratrustPermission.php line 56


at LaratrustPermission->handle(object(Request), object(Closure), array('read-admin-panel'))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in AdminMenu.php line 201


at AdminMenu->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in SetLocale.php line 94


at SetLocale->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in LoadCurrencies.php line 27


at LoadCurrencies->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in LoadSettings.php line 27


at LoadSettings->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in AddXHeader.php line 18


at AddXHeader->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in RedirectIfNotInstalled.php line 21


at RedirectIfNotInstalled->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in SubstituteBindings.php line 41


at SubstituteBindings->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in Authenticate.php line 43


at Authenticate->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in VerifyCsrfToken.php line 65


at VerifyCsrfToken->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in ShareErrorsFromSession.php line 49


at ShareErrorsFromSession->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in StartSession.php line 64


at StartSession->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37


at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in EncryptCookies.php line 59


at EncryptCookies->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 102


at Pipeline->then(object(Closure))in Router.php line 574


at Router->runRouteWithinStack(object(Route), object(Request))in Router.php line 533


at Router->dispatchToRoute(object(Request))in Router.php line 511


at Router->dispatch(object(Request))in Kernel.php line 176


at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))in Pipeline.php line 30


at Pipeline->Illuminate\Routing\{closure}(object(Request))in Debugbar.php line 51


at Debugbar->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in TrustProxies.php line 56


at TrustProxies->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in TransformsRequest.php line 30


at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in TransformsRequest.php line 30


at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in ValidatePostSize.php line 27


at ValidatePostSize->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in CheckForMaintenanceMode.php line 46


at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in Request.php line 111


at Request->handle(object(Request), object(Closure))in Pipeline.php line 148


at Pipeline->Illuminate\Pipeline\{closure}(object(Request))in Pipeline.php line 53


at Pipeline->Illuminate\Routing\{closure}(object(Request))in Pipeline.php line 102


at Pipeline->then(object(Closure))in Kernel.php line 151


at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 116


at Kernel->handle(object(Request))in index.php line 27



Sebastian Di Luise   ( User )

Commented 6 years ago

Ahhh sorry didnt understood it was the same error.


 


It seems some updates to latest 1.2x version fails, you can try to go back to the last version that worked with your data and try again the update to the latest.


 


For this you will have to download the old version you had from https://github.com/akaunting/akaunting/releases, as Denis wrote.  The copy the content to your akaunting install so you go back to last working install, so at least you can access again.  Its useful before updating to a new version... to have a complete separate working copy of your installation, and an exact copy called i.e. "akaunting-test" and there you try the update without risk.


 


Can you try that?

Please login or register to leave a response.

Showing 1 to 6 of 6 discussions