Recent Topics

Error while adding categories



  • I am facing error while creating categories, it is only happening when selecting root category.

    Mysql version is Server version: 8.0.22-0ubuntu0.20.04.2 (Ubuntu)
    PHP 7.4

    SQLSTATE[HY000] [2002] Connection refused (SQL: update categories set _lft = case when _lft >= 16 then _lft+2 else _lft end, _rgt = case when _rgt >= 16 then _rgt+2 else _rgt end where (_lft >= 16 or _rgt >= 16))





  • Hi,

    After doing that I have facing below issue, I tried above link before as well and have faced same issue:

    SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION kartofart.get_url_path_of_category does not exist

    Illuminate\Database\QueryException thrown with message "SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION kartofart.get_url_path_of_category does not exist (SQL: update categories set _lft = case when _lft >= 16 then _lft+2 else _lft end, _rgt = case when _rgt >= 16 then _rgt+2 else _rgt end where (_lft >= 16 or _rgt >= 16))"

    Stacktrace:
    #62 Illuminate\Database\QueryException in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
    #61 Doctrine\DBAL\Driver\PDOException in /var/www/html/kartofart/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119
    #60 PDOException in /var/www/html/kartofart/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
    #59 PDOStatement:execute in /var/www/html/kartofart/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117
    #58 Doctrine\DBAL\Driver\PDOStatement:execute in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Connection.php:489
    #57 Illuminate\Database\Connection:Illuminate\Database{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    #56 Illuminate\Database\Connection:runQueryCallback in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Connection.php:631
    #55 Illuminate\Database\Connection:run in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Connection.php:496
    #54 Illuminate\Database\Connection:affectingStatement in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Connection.php:429
    #53 Illuminate\Database\Connection:update in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2860
    #52 Illuminate\Database\Query\Builder:update in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/QueryBuilder.php:603
    #51 Kalnoy\Nestedset\QueryBuilder:makeGap in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:609
    #50 Webkul\Category\Models\Category:insertNode in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:574
    #49 Webkul\Category\Models\Category:insertAt in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:171
    #48 Webkul\Category\Models\Category:actionAppendOrPrepend in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:102
    #47 call_user_func_array in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:102
    #46 Webkul\Category\Models\Category:callPendingAction in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:47
    #45 Webkul\Category\Models\Category:Kalnoy\Nestedset{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:381
    #44 Illuminate\Events\Dispatcher:Illuminate\Events{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:226
    #43 Illuminate\Events\Dispatcher:dispatch in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:199
    #42 Illuminate\Events\Dispatcher:until in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php:189
    #41 Illuminate\Database\Eloquent\Model:fireModelEvent in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php:714
    #40 Illuminate\Database\Eloquent\Model:save in /var/www/html/kartofart/vendor/kalnoy/nestedset/src/NodeTrait.php:764
    #39 Webkul\Category\Models\Category:create in /var/www/html/kartofart/packages/Webkul/Category/src/Repositories/CategoryRepository.php:47
    #38 Webkul\Category\Repositories\CategoryRepository:create in /var/www/html/kartofart/packages/Webkul/Category/src/Http/Controllers/CategoryController.php:89
    #37 Webkul\Category\Http\Controllers\CategoryController:store in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
    #36 Illuminate\Routing\Controller:callAction in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45
    #35 Illuminate\Routing\ControllerDispatcher:dispatch in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Route.php:239
    #34 Illuminate\Routing\Route:runController in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Route.php:196
    #33 Illuminate\Routing\Route:run in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Router.php:685
    #32 Illuminate\Routing\Router:Illuminate\Routing{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128
    #31 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/packages/Webkul/User/src/Http/Middleware/Bouncer.php:27
    #30 Webkul\User\Http\Middleware\Bouncer:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #29 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
    #28 Illuminate\Routing\Middleware\SubstituteBindings:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #27 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:77
    #26 Illuminate\Foundation\Http\Middleware\VerifyCsrfToken:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #25 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php:39
    #24 Illuminate\Session\Middleware\AuthenticateSession:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #23 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49
    #22 Illuminate\View\Middleware\ShareErrorsFromSession:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #21 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103
    #20 Illuminate\Pipeline\Pipeline:then in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Router.php:687
    #19 Illuminate\Routing\Router:runRouteWithinStack in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Router.php:662
    #18 Illuminate\Routing\Router:runRoute in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Router.php:628
    #17 Illuminate\Routing\Router:dispatchToRoute in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Routing/Router.php:617
    #16 Illuminate\Routing\Router:dispatch in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:165
    #15 Illuminate\Foundation\Http\Kernel:Illuminate\Foundation\Http{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128
    #14 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php:67
    #13 Barryvdh\Debugbar\Middleware\InjectDebugbar:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #12 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:116
    #11 Illuminate\Session\Middleware\StartSession:handleStatefulRequest in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:62
    #10 Illuminate\Session\Middleware\StartSession:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #9 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37
    #8 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #7 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67
    #6 Illuminate\Cookie\Middleware\EncryptCookies:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #5 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:63
    #4 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode:handle in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167
    #3 Illuminate\Pipeline\Pipeline:Illuminate\Pipeline{closure} in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103
    #2 Illuminate\Pipeline\Pipeline:then in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:140
    #1 Illuminate\Foundation\Http\Kernel:sendRequestThroughRouter in /var/www/html/kartofart/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:109
    #0 Illuminate\Foundation\Http\Kernel:handle in /var/www/html/kartofart/public/index.php:74



  • @SourabhAkash
    May i know your database server details



  • Your MySQL connection id is 24
    Server version: 8.0.22-0ubuntu0.20.04.2 (Ubuntu)

    This is the mysql server details.



  • @SourabhAkash
    are you trying to install it on local server or live server?


Log in to reply