Recent Topics

SQL statement error



  • Hello everyone.. I am getting a very strange error when I try to call categories through the api.. http://tresjolie.shop:8081/api/categories

    Illuminate\Database\QueryException thrown with message "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q' in 'where clause' (SQL: select count(*) as aggregate from categories where q in (/api/categories))"

    Stacktrace:
    #55 Illuminate\Database\QueryException in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    #54 Doctrine\DBAL\Driver\PDOException in /var/www/shop/bagisto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:63
    #53 PDOException in /var/www/shop/bagisto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61
    #52 PDO:prepare in /var/www/shop/bagisto/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61
    #51 Doctrine\DBAL\Driver\PDOConnection:prepare in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326
    #50 Illuminate\Database\Connection:Illuminate\Database{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
    #49 Illuminate\Database\Connection:runQueryCallback in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
    #48 Illuminate\Database\Connection:run in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
    #47 Illuminate\Database\Connection:select in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1963
    #46 Illuminate\Database\Query\Builder:runSelect in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1951
    #45 Illuminate\Database\Query\Builder:Illuminate\Database\Query{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2435
    #44 Illuminate\Database\Query\Builder:onceWithColumns in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1952
    #43 Illuminate\Database\Query\Builder:get in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2048
    #42 Illuminate\Database\Query\Builder:runPaginationCountQuery in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2021
    #41 Illuminate\Database\Query\Builder:getCountForPagination in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:710
    #40 Illuminate\Database\Eloquent\Builder:paginate in /var/www/shop/bagisto/vendor/prettus/l5-repository/src/Prettus/Repository/Eloquent/BaseRepository.php:429
    #39 Prettus\Repository\Eloquent\BaseRepository:paginate in /var/www/shop/bagisto/packages/Webkul/API/Http/Controllers/Shop/ResourceController.php:79
    #38 Webkul\API\Http\Controllers\Shop\ResourceController:index in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
    #37 call_user_func_array in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
    #36 Illuminate\Routing\Controller:callAction in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45
    #35 Illuminate\Routing\ControllerDispatcher:dispatch in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Route.php:212
    #34 Illuminate\Routing\Route:runController in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Route.php:169
    #33 Illuminate\Routing\Route:run in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php:665
    #32 Illuminate\Routing\Router:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
    #31 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/packages/Webkul/Shop/src/Http/Middleware/Currency.php:46
    #30 Webkul\Shop\Http\Middleware\Currency:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #29 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #28 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/packages/Webkul/Shop/src/Http/Middleware/Theme.php:31
    #27 Webkul\Shop\Http\Middleware\Theme:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #26 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #25 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/packages/Webkul/Shop/src/Http/Middleware/Locale.php:50
    #24 Webkul\Shop\Http\Middleware\Locale:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #23 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #22 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
    #21 Illuminate\Pipeline\Pipeline:then in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php:667
    #20 Illuminate\Routing\Router:runRouteWithinStack in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php:642
    #19 Illuminate\Routing\Router:runRoute in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php:608
    #18 Illuminate\Routing\Router:dispatchToRoute in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php:597
    #17 Illuminate\Routing\Router:dispatch in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
    #16 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
    #15 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:63
    #14 Illuminate\Session\Middleware\StartSession:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #13 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #12 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37
    #11 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #10 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #9 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:66
    #8 Illuminate\Cookie\Middleware\EncryptCookies:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #6 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
    #5 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:151
    #4 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
    #3 Illuminate\Routing\Pipeline:Illuminate\Routing{closure} in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
    #2 Illuminate\Pipeline\Pipeline:then in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
    #1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /var/www/shop/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
    #0 Illuminate\Foundation\Http\Kernel:handle in /var/www/shop/bagisto/public/index.php:74



  • Hi @elkadye

    Can you tell me which version of bagisto , you are using ?

    Thanks



  • i tried it for 0.1.6 and 0.1.8. same results..


Log in to reply