-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
SQL-Error for getRecentActivities() caused by GROUP BY #488
Comments
SolutionAfter doing some research and updating the settings on my prod-server, I've found my way: Some articles (e.g. this) describe the new default settings of mysql 5.7 as "strict" which needs some adaptions. The corresponding settings in MariaDB (see this article) allows me to adapt the sql-mode (
I don't know how this affects the security or other settings on my server, but kimai works fine this way. Note: I found this solution before creating the issue, but due to some misconfigurations, I haven't bring it to work with the right sql-mode settings. After all, I think that this Information needs to be documented. DocumentationRegarding the install-documentation and kimai requirements, I suggest to add some sentences about the STRICT-mode and how to remove the Doctrine ConfigurationMaybe my solution is not the best way. As far as I can see, this could/should also be done in doctrine settings, a listener or something similar to set the sql-mode for the current connection. (The doctrine configuration for symfony allows to add a wrapper class: https://symfony.com/doc/current/reference/configuration/doctrine.html#doctrine-dbal-configuration) |
Thanks for posting the solution. I will check if I can reproduce this. |
I did some research, as the flag |
For my current prod-setup, I removed the For the long time path of kimai, I think it's important to fix this, but at the moment I'm ok with this - also with the query splitted into subqueries and a foreach. |
That was a fantastic link! |
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. |
Describe the bug
The DB-Query, generated in
App\Repository\ActivityRepository::getRecentActivities()
causes the following error on my production server (only production, not dev-machine)My prod-env:
My dev-env:
Expected behavior
After the login, some of my custom additions to kimai didn't load (were working fine in dev, on my local machine) and the
prod.log
gave me this sql error.Additional context
I also tried to update the setting
config/packages/doctrine.yaml -> doctrine.dbal.server_version
tomariadb-10.2.21
(as described here: https://symfony.com/doc/current/reference/configuration/doctrine.html#doctrine-dbal-configuration)The text was updated successfully, but these errors were encountered: