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: Slim Application Error #6746

Closed
ghimbyr opened this issue Dec 12, 2023 · 3 comments
Closed

Bug: Slim Application Error #6746

ghimbyr opened this issue Dec 12, 2023 · 3 comments

Comments

@ghimbyr
Copy link

ghimbyr commented Dec 12, 2023

Hello
I need help with an error
When i enter to see a family i receive this error:

Slim Application Error
The application could not run because of the following error:

Details
Type: ValueError
Message: Unknown format specifier "a"
File: /home/adonai/crm.adonai.ro/ChurchCRM/model/ChurchCRM/Person.php
Line: 659
Trace
#0 /home/adonai/crm.adonai.ro/ChurchCRM/model/ChurchCRM/Person.php(659): sprintf('de % ani', 23)
#1 /home/adonai/crm.adonai.ro/v2/templates/people/family-view.php(285): ChurchCRM\model\ChurchCRM\Person->getAge()
#2 /home/adonai/crm.adonai.ro/vendor/slim/php-view/src/PhpRenderer.php(215): include('/home/adonai/cr...')
#3 /home/adonai/crm.adonai.ro/vendor/slim/php-view/src/PhpRenderer.php(183): Slim\Views\PhpRenderer->protectedIncludeScope('templates/peopl...', Array)
#4 /home/adonai/crm.adonai.ro/vendor/slim/php-view/src/PhpRenderer.php(152): Slim\Views\PhpRenderer->fetchTemplate('family-view.php', Array)
#5 /home/adonai/crm.adonai.ro/vendor/slim/php-view/src/PhpRenderer.php(49): Slim\Views\PhpRenderer->fetch('family-view.php', Array, true)
#6 /home/adonai/crm.adonai.ro/v2/routes/family.php(111): Slim\Views\PhpRenderer->render(Object(Slim\Http\Response), 'family-view.php', Array)
#7 [internal function]: viewFamily(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#8 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func('viewFamily', Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke('viewFamily', Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#11 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /home/adonai/crm.adonai.ro/ChurchCRM/Slim/Middleware/VersionMiddleware.php(13): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 [internal function]: ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#15 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ChurchCRM\Slim\Middleware\VersionMiddleware), Array)
#16 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#17 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#18 /home/adonai/crm.adonai.ro/ChurchCRM/Slim/Middleware/AuthMiddleware.php(33): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 [internal function]: ChurchCRM\Slim\Middleware\AuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#20 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ChurchCRM\Slim\Middleware\AuthMiddleware), Array)
#21 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#22 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#23 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#24 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#25 /home/adonai/crm.adonai.ro/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#26 /home/adonai/crm.adonai.ro/v2/index.php(52): Slim\App->run()
#27 {main}

  • ChurchCRM version: 5.3.1
  • PHP version is the server running: 8.1
  • DB Server and Version are you running:
@ghimbyr ghimbyr added the bug label Dec 12, 2023
@DAcodedBEAT
Copy link
Contributor

@ghimbyr Let's debug this together:

  • The error states Unknown format specifier "a" on /home/adonai/crm.adonai.ro/ChurchCRM/model/ChurchCRM/Person.php, Line: 659
  • The error trace states:
#0 /home/adonai/crm.adonai.ro/ChurchCRM/model/ChurchCRM/Person.php(659): sprintf('de % ani', 23)

which looks like % ani is used for the "format specifier"

If you want this fixed, feel free to update the translation in POEditor: https://poeditor.com/join/project/RABdnDSqAt

@DAcodedBEAT
Copy link
Contributor

@ghimbyr update: I received access to POEditor and edited that translation for you. This fix should be available whenever the next release is made

@DAcodedBEAT
Copy link
Contributor

@ghimbyr be on the lookup for release 5.4.1. since the code has been merged, I am going to close this issue. Feel free to reopen this if you still face this issue once upgraded to 5.4.1

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

No branches or pull requests

2 participants