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: shopping list #259

Closed
hauweg opened this issue May 22, 2019 · 11 comments
Closed

bug: shopping list #259

hauweg opened this issue May 22, 2019 · 11 comments
Labels

Comments

@hauweg
Copy link

hauweg commented May 22, 2019

Shopping List page replies this. no clue what it means :)

Slim Application Error

The application could not run because of the following error:
Details
Type: ErrorException
Message: Argument 2 passed to Grocy\Services\LocalizationService::__n() must be of the type string, null given, called in /wwwpath/grocyinstall/controllers/BaseController.php on line 41 (View: /wwwpath/grocyinstall/views/shoppinglist.blade.php)
File: /wwwpath/grocyinstall/services/LocalizationService.php
Line: 126
Trace

#0 /wwwpath/grocyinstall/vendor/illuminate/view/Engines/PhpEngine.php(47): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(Symfony\Component\Debug\Exception\FatalThrowableError), 2)
#1 /wwwpath/grocyinstall/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/vhosts...', Array)
#2 /wwwpath/grocyinstall/vendor/illuminate/view/View.php(142): Illuminate\View\Engines\CompilerEngine->get('/var/www/vhosts...', Array)
#3 /wwwpath/grocyinstall/vendor/illuminate/view/View.php(125): Illuminate\View\View->getContents()
#4 /wwwpath/grocyinstall/vendor/illuminate/view/View.php(90): Illuminate\View\View->renderContents()
#5 /wwwpath/grocyinstall/vendor/rubellum/slim-blade-view/src/Blade.php(173): Illuminate\View\View->render()
#6 /wwwpath/grocyinstall/vendor/rubellum/slim-blade-view/src/Blade.php(65): Slim\Views\Blade->fetch('shoppinglist', Array)
#7 /wwwpath/grocyinstall/controllers/StockController.php(80): Slim\Views\Blade->render(Object(Slim\Http\Response), 'shoppinglist', Array)
#8 [internal function]: Grocy\Controllers\StockController->ShoppingList(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /wwwpath/grocyinstall/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /wwwpath/grocyinstall/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#11 /wwwpath/grocyinstall/middleware/SessionAuthMiddleware.php(57): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#13 /wwwpath/grocyinstall/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#14 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#15 /wwwpath/grocyinstall/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#16 /wwwpath/grocyinstall/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /wwwpath/grocyinstall/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /wwwpath/grocyinstall/vendor/slim/slim/Slim/App.php(5//wwwpath/grocyinstall/15): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /wwwpath/grocyinstall/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 /wwwpath/grocyinstall/vendor/slim/slim/Slim/App.php(405): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#21 /wwwpath/grocyinstall/vendor/slim/slim/Slim/App.php(313): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#22 /wwwpath/grocyinstall/app.php(71): Slim\App->run()
#23 /wwwpath/grocyinstall/public/index.php(3): require_once('/var/www/vhosts...')
#24 {main}

Previous exception
Type: Symfony\Component\Debug\Exception\FatalThrowableError
Message: Argument 2 passed to Grocy\Services\LocalizationService::__n() must be of the type string, null given, called in /wwwpath/grocyinstall/controllers/BaseController.php on line 41
File: /wwwpath/grocyinstall/services/LocalizationService.php
Line: 126
Trace

#0 /wwwpath/grocyinstall/controllers/BaseController.php(41): Grocy\Services\LocalizationService->__n('40', NULL, NULL)
#1 /wwwpath/grocyinstall/data/viewcache/8a5027b92cb22dcacbdd512176aa5d57c9049038.php(102): Grocy\Controllers\BaseController->Grocy\Controllers{closure}('40', NULL, NULL)
#2 /wwwpath/grocyinstall/vendor/illuminate/view/Engines/PhpEngine.php(43): include('/var/www/vhosts...')
#3 /wwwpath/grocyinstall/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/var/www/vhosts...', Array)
#4 /wwwpath/grocyinstall/vendor/illuminate/view/View.php(142): Illuminate\View\Engines\CompilerEngine->get('/var/www/vhosts...', Array)
#5 /wwwpath/grocyinstall/vendor/illuminate/view/View.php(125): Illuminate\View\View->getContents()
#6 /wwwpath/grocyinstall/vendor/illuminate/view/View.php(90): Illuminate\View\View->renderContents()
#7 /wwwpath/grocyinstall/vendor/rubellum/slim-blade-view/src/Blade.php(173): Illuminate\View\View->render()
#8 /wwwpath/grocyinstall/vendor/rubellum/slim-blade-view/src/Blade.php(65): Slim\Views\Blade->fetch('shoppinglist', Array)
#9 /wwwpath/grocyinstall/controllers/StockController.php(80): Slim\Views\Blade->render(Object(Slim\Http\Response), 'shoppinglist', Array)
#10 [internal function]: Grocy\Controllers\StockController->ShoppingList(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#11 /wwwpath/grocyinstall/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#12 /wwwpath/grocyinstall/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#13 /wwwpath/grocyinstall/middleware/SessionAuthMiddleware.php(57): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#15 /wwwpath/grocyinstall/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#16 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#17 /wwwpath/grocyinstall/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#18 /wwwpath/grocyinstall/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /wwwpath/grocyinstall/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 /wwwpath/grocyinstall/vendor/slim/slim/Slim/App.php(515): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#21 /wwwpath/grocyinstall/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#22 /wwwpath/grocyinstall/vendor/slim/slim/Slim/App.php(405): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#23 /wwwpath/grocyinstall/vendor/slim/slim/Slim/App.php(313): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#24 /wwwpath/grocyinstall/app.php(71): Slim\App->run()
#25 /wwwpath/grocyinstall/public/index.php(3): require_once('/var/www/vhosts...')
#26 {main}

@berrnd
Copy link
Member

berrnd commented May 22, 2019

And what do I need to do to reproduce this?

There was s similar error in the first published release of v2.4.0, which I noticed myself after upgrading the demos, the release was fixed and replaced after 15 minutes (55e5fd7 vs d412b81) - so could affect you if you downloaded v2.4.0 in the first 15 minutes - do you run the latest version v2.4.1?

@hauweg
Copy link
Author

hauweg commented May 22, 2019

dont know. i was adding numbers on the inventory page. after that i returned to the shopping list and it showed this result

@hauweg
Copy link
Author

hauweg commented May 22, 2019

Version 2.4.1
Veröffentlicht am 2019-05-16 vor 7 Tagen

PHP Version 7.2.18
SQLite Version 3.16.2

@berrnd
Copy link
Member

berrnd commented May 22, 2019

Please check if you have a quantity unit without a name and/or without a name in plural form - maybe this causes this... (?)

@hauweg
Copy link
Author

hauweg commented May 22, 2019

all quantitys have names and plural forms :-(

@berrnd
Copy link
Member

berrnd commented May 22, 2019

Ok, so maybe we just remove the type hints for the localization functions, however a translation here can be null...

Could you try replacing the file in the attached ZIP if that helps for now?

grocy_patch_issue259.zip

@berrnd berrnd added bug and removed question labels May 22, 2019
@hauweg
Copy link
Author

hauweg commented May 22, 2019

uff. thats a case for our admin :)

will send him a text now...

@hauweg
Copy link
Author

hauweg commented May 22, 2019

thank u for your super fast support <3

@hauweg
Copy link
Author

hauweg commented May 23, 2019

great - it worked :)

@hauweg hauweg closed this as completed May 23, 2019
@hauweg
Copy link
Author

hauweg commented May 23, 2019

@hauweg hauweg reopened this May 23, 2019
@hauweg hauweg closed this as completed May 23, 2019
@berrnd
Copy link
Member

berrnd commented May 23, 2019

Thanks for testing, but let's close this when it's not only done as a quick patch here...

@berrnd berrnd reopened this May 23, 2019
@berrnd berrnd closed this as completed in 9f2481a Jun 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants