glorpen / kimai-duration-plugin

Enables setting duration rounding option (same as global one) to override rounding for any Customer, Project or Activity.
GNU General Public License v3.0
3 stars 3 forks source link

PHP Exception / Kimai 2 (1.19.6) #1

Closed andreaspollak closed 2 years ago

andreaspollak commented 2 years ago

After installing on current Kimai 1.19.6, I've got a problem

[2022-05-05 08:33:03] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\InvalidArgumentException: "The name "glorpen.duration" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":")." at /var/www/clients/clienX/webXXXX/web/vendor/symfony/form/FormConfigBuilder.php line 782 {"exception":"[object] (Symfony\\Component\\Form\\Exception\\InvalidArgumentException(code: 0): The name \"glorpen.duration\" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores (\"_\"), hyphens (\"-\") and colons (\":\"). at /var/www/clients/clientX/webXXXX/web/vendor/symfony/form/FormConfigBuilder.php:782)"} []
[2022-05-05 08:33:03] request.INFO: Matched route "admin_activity_edit". {"route":"admin_activity_edit","route_parameters":{"_route":"admin_activity_edit","_controller":"App\\Controller\\ActivityController::editAction","_locale":"de","id":"1"},"request_uri":"https://xxx/de/admin/activity/1/edit","method":"GET"} []

https://github.com/glorpen/kimai-duration-plugin/blob/80840cfbe0cab23eb211110dc6ff9b4a19cc37c0/Timesheet/Rounding/OverriddenDurationRounding.php#L19

Solution changed 'glorpen.duration' to 'glorpen_duration'

glorpen commented 2 years ago

Thanks! I've applied your fix, available now in v1.0.2.