Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Error when adding or editing a quantity unit #2350

Closed
steiditi opened this issue Sep 28, 2023 · 3 comments
Closed

Bug: Error when adding or editing a quantity unit #2350

steiditi opened this issue Sep 28, 2023 · 3 comments

Comments

@steiditi
Copy link

steiditi commented Sep 28, 2023

I tried to add a new quantity type. When I click the button to add the following error occurs. This alos happens, when I try to edit one quentity unit. I have one custom field for the quantity unit that is of type checkbox. This first happend after the last update to version 4.0.3

Error source:

/config/data/viewcache/310b22a807da34b33289c5d843ec258f.php:37

Error message:

Undefined constant Grocy\Services\UserfieldsService::USERFIELD_TYPE_INTEGRAL_NUMBER (View: /app/www/views/components/userfieldsform.blade.php) (View: /app/www/views/components/userfieldsform.blade.php)

Stack trace:

#0 /app/www/packages/illuminate/view/Engines/PhpEngine.php(60): Illuminate\View\Engines\CompilerEngine->handleViewException()
#1 /app/www/packages/illuminate/view/Engines/CompilerEngine.php(72): Illuminate\View\Engines\PhpEngine->evaluatePath()
#2 /app/www/packages/illuminate/view/View.php(195): Illuminate\View\Engines\CompilerEngine->get()
#3 /app/www/packages/illuminate/view/View.php(178): Illuminate\View\View->getContents()
#4 /app/www/packages/illuminate/view/View.php(147): Illuminate\View\View->renderContents()
#5 /app/www/packages/berrnd/slim-blade-view/src/Blade.php(173): Illuminate\View\View->render()
#6 /app/www/packages/berrnd/slim-blade-view/src/Blade.php(65): Slim\Views\Blade->fetch()
#7 /app/www/controllers/BaseController.php(186): Slim\Views\Blade->render()
#8 /app/www/controllers/BaseController.php(209): Grocy\Controllers\BaseController->render()
#9 /app/www/controllers/StockController.php(350): Grocy\Controllers\BaseController->renderPage()
#10 /app/www/packages/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Grocy\Controllers\StockController->QuantityUnitEditForm()
#11 /app/www/packages/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke()
#12 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle()
#13 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle()
#14 /app/www/packages/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle()
#15 /app/www/packages/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run()
#16 /app/www/middleware/LocaleMiddleware.php(16): Slim\Routing\RouteRunner->handle()
#17 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(269): Grocy\Middleware\LocaleMiddleware->__invoke()
#18 /app/www/middleware/AuthMiddleware.php(77): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#19 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(269): Grocy\Middleware\AuthMiddleware->__invoke()
#20 /app/www/packages/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#21 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process()
#22 /app/www/packages/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#23 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process()
#24 /app/www/middleware/CorsMiddleware.php(27): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#25 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(269): Grocy\Middleware\CorsMiddleware->__invoke()
#26 /app/www/packages/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle()
#27 /app/www/packages/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle()
#28 /app/www/packages/slim/slim/Slim/App.php(183): Slim\App->handle()
#29 /app/www/app.php(112): Slim\App->run()
#30 /app/www/public/index.php(45): require_once('...')
#31 {main}

System info:

{
    "grocy_version": {
        "Version": "4.0.3",
        "ReleaseDate": "2023-09-02"
    },
    "php_version": "8.2.10",
    "sqlite_version": "3.41.2",
    "os": "Linux 5.15.0-1038-raspi #41-Ubuntu SMP PREEMPT Fri Sep 8 12:38:39 UTC 2023 aarch64",
    "client": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko\/20100101 Firefox\/118.0"
}
@steiditi steiditi added the bug label Sep 28, 2023
@steiditi steiditi changed the title Bug: Bug: Error when adding or editing a quantity unit Sep 28, 2023
@berrnd
Copy link
Member

berrnd commented Sep 29, 2023

This first happend after the last update to version 4.0.3

Which simply means you've ignored what's mentioned in README about what to do when updating:

  • Empty the data/viewcache directory

So simply do that and this "Bug" will fix itself like magic.

@berrnd berrnd closed this as completed Sep 29, 2023
@steiditi

This comment was marked as off-topic.

@berrnd

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants