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

Unrecognized Options "renderer, number_generator" under "kimai.invoice" #381

Closed
srdco opened this issue Oct 31, 2018 · 12 comments
Closed

Unrecognized Options "renderer, number_generator" under "kimai.invoice" #381

srdco opened this issue Oct 31, 2018 · 12 comments

Comments

@srdco
Copy link
Contributor

srdco commented Oct 31, 2018

Blank screen on kimai -- not sure what happened trying to update, then switch to invoice-activity branch, then switch back to master. Probably has something to do with being rusty on git.

Now, I can't get any command to complete -- the update command, the clear cache, the warmup cache, all give the exact same response:

bin/console doctrine:migrations:migrate

PHP Notice:  Found invalid "kimai" configuration: Unrecognized options "renderer, number_generator" under "kimai.invoice" in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 32
PHP Notice:  Undefined index: languages in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 36
PHP Notice:  Undefined index: calendar in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 37
PHP Notice:  Undefined index: theme in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 38
PHP Notice:  Undefined index: dashboard in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 39
PHP Notice:  Undefined index: widgets in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 40
PHP Notice:  Undefined index: invoice in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 41
PHP Notice:  Undefined index: defaults in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 42
PHP Notice:  Undefined index: user in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 54
PHP Notice:  Undefined index: user in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 60
PHP Notice:  Undefined index: user in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 66
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 75
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 76
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 77
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 78
PHP Warning:  Invalid argument supplied for foreach() in /var/www/kimai2/src/DependencyInjection/Compiler/TwigContextCompilerPass.php on line 37

In ArrayNode.php line 311:
                                                                           
  Unrecognized options "renderer, number_generator" under "kimai.invoice"  
@kevinpapst
Copy link
Member

Did you check the permission for var/? Use chmod -R 777 var/ to make sure this is not the reason

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

Ran sudo chmod -R 777 /var/www/kimai2/var
Then, ```sudo -u www-data composer install --no-dev --optimize-autoloader

In Filesystem.php line 232:

Could not delete /var/www/kimai2/vendor/theseer/tokenizer/tests/_files:

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

Then:

user@computer:/var/www/kimai2$ sudo -u www-data bin/console cache:clear --env=prod
PHP Notice:  Found invalid "kimai" configuration: Unrecognized options "renderer, number_generator" under "kimai.invoice" in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 32
PHP Notice:  Undefined index: languages in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 36
PHP Notice:  Undefined index: calendar in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 37
PHP Notice:  Undefined index: theme in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 38
PHP Notice:  Undefined index: dashboard in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 39
PHP Notice:  Undefined index: widgets in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 40
PHP Notice:  Undefined index: invoice in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 41
PHP Notice:  Undefined index: defaults in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 42
PHP Notice:  Undefined index: user in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 54
PHP Notice:  Undefined index: user in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 60
PHP Notice:  Undefined index: user in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 66
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 75
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 76
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 77
PHP Notice:  Undefined index: timesheet in /var/www/kimai2/src/DependencyInjection/AppExtension.php on line 78
PHP Warning:  Invalid argument supplied for foreach() in /var/www/kimai2/src/DependencyInjection/Compiler/TwigContextCompilerPass.php on line 37

In ArrayNode.php line 311:
                                                                           
  Unrecognized options "renderer, number_generator" under "kimai.invoice"  
                                                                      

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

Here's the server log if that helps (from /var/log/apache2/).

kimai-error.log.txt

@kevinpapst
Copy link
Member

Fix the permissions for vendor/. Also check if you have a local.yaml in config/packages/.

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

I think I fixed the permissions.
There is no local.yaml in config/packages ... I did a search and there is no local.yaml under the whole directory.
Any idea why it would be missing?

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

There is a kimai.yaml ...

@kevinpapst
Copy link
Member

The local.yaml is not included with Kimai. But it can be created to store your own settings. This is recommended instead of editing kimai.yaml directly (as stated in the documentation) to make sure you don't run into troubles when updating.
So I am wondering why that error exists, as these keys are not in the official kimai.yaml any longer.
I can only think of two possible reasons for the above error:

  • you created a local.yaml (what you didn't do)
  • you edited the kimai.yaml and now have a merge problem after you switched the branch

Check git status and revert your local changes to kimai.yaml (store them somewhere first if you need them).

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

Well, I don't know what exactly happened, because I never edited kimai.yaml.
However, what I did do was back up the database, dump the whole kimai2 folder into a backup folder, and reinstall and connect to the existing database.
Half of my problems seemed to be revolving around trying to use the www-data user, since this is primarily a personal desktop that functions secondarily as a server for the local network. I switched to using my logged-in user (primary user), and the permission problems pretty much went away, and everything installed and updated and cached properly.
Back up ... think I'll wait on trying out the invoice calculations for tomorrow.

Thanks again for all your help!

@kevinpapst
Copy link
Member

Aha, yeah well the documentation is meant for server installations.
Its impossible to document all possible installation types, as permissions are very much dependent on your setup.
Sorry for the troubles and thanks for the feedback!
I'll close it then, if more problem pop up, just reopen it.

@srdco
Copy link
Contributor Author

srdco commented Oct 31, 2018

No problem - it wasn't meant as a criticism, just a comment - maybe helpful of someone else.
Thanks again!

@lock
Copy link

lock bot commented Dec 30, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@lock lock bot locked and limited conversation to collaborators Dec 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants