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

calendar week timesheet task with duration=true error 500 #704

Closed
bjdros opened this issue Apr 14, 2019 · 6 comments · Fixed by #784
Closed

calendar week timesheet task with duration=true error 500 #704

bjdros opened this issue Apr 14, 2019 · 6 comments · Fixed by #784
Labels
Milestone

Comments

@bjdros
Copy link

bjdros commented Apr 14, 2019

when creating a new task from the week calendar view with

    duration_only: true

i get this error :

500: Internal Server Error

It does not happen when this configuration is set in the local.yaml file :

duration only: false

And it does not happen from the month calendar.
And what also happens when creating a task from the month calendar always starts at 10:00.
But in the local.yaml it is configured like this :

calendar:
    week_numbers: true
    day_limit: 4
    businessHours:
        days: [1, 2, 3, 4, 5]
        begin: '08:00'
        end: '20:00'

Logfile

[2019-04-14 13:40:00] request.INFO: Matched route "timesheet_create". {"route":"timesheet_create","route_parameters":{"_route":"timesheet_create","_controller":"App\Controller\TimesheetController::createAction","_locale":"es"},"request_uri":"http://localhost/kimaidurasemana/public/es/timesheet/create?origin=timesheet","method":"POST"} []
[2019-04-14 13:40:00] security.DEBUG: Read existing security token from the session. {"key":"_security_secured_area","token_class":"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"} []
[2019-04-14 13:40:00] php.INFO: User Deprecated: Checking for the AdvancedUserInterface in "Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasUserChanged()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\Component\Security\Core\User\EquatableInterface to check if the user has been changed, {"exception":"[object] (ErrorException(code: 0): User Deprecated: Checking for the AdvancedUserInterface in "Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasUserChanged()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\Component\Security\Core\User\EquatableInterface to check if the user has been changed, at D:\xampp\htdocs\kimaidurasemana\vendor\symfony\security\Core\Authentication\Token\AbstractToken.php:265)"} []
[2019-04-14 13:40:00] php.INFO: User Deprecated: Checking for the AdvancedUserInterface in "Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasUserChanged()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\Component\Security\Core\User\EquatableInterface to check if the user has been changed, {"exception":"[object] (ErrorException(code: 0): User Deprecated: Checking for the AdvancedUserInterface in "Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasUserChanged()" is deprecated since Symfony 4.1 and support for it will be removed in 5.0. Implement the Symfony\Component\Security\Core\User\EquatableInterface to check if the user has been changed, at D:\xampp\htdocs\kimaidurasemana\vendor\symfony\security\Core\Authentication\Token\AbstractToken.php:265)"} []
[2019-04-14 13:40:00] security.DEBUG: User was reloaded from a user provider. {"provider":"FOS\UserBundle\Security\EmailUserProvider","username":"brienen"} []
[2019-04-14 13:40:00] security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"secured_area","authenticators":1} []
[2019-04-14 13:40:01] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"secured_area","authenticator":"App\Security\TokenAuthenticator"} []
[2019-04-14 13:40:01] security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"secured_area","authenticator":"App\Security\TokenAuthenticator"} []
[2019-04-14 13:40:01] request.CRITICAL: Uncaught PHP Exception Symfony\Component\PropertyAccess\Exception\InvalidArgumentException: "Expected argument of type "DateTime", "NULL" given." at D:\xampp\htdocs\kimaidurasemana\vendor\symfony\property-access\PropertyAccessor.php line 173 {"exception":"[object] (Symfony\Component\PropertyAccess\Exception\InvalidArgumentException(code: 0): Expected argument of type "DateTime", "NULL" given. at D:\xampp\htdocs\kimaidurasemana\vendor\symfony\property-access\PropertyAccessor.php:173)"} []
[2019-04-14 13:40:01] security.DEBUG: Stored the security token in the session. {"key":"_security_secured_area"} []

  • Device: Notebook
  • OS: Windows10
  • Browser: chrome
  • Version: Versión 73.0.3683.103 (Build oficial) (64 bits)
  • Kimai 0.8.1
  • PHP Version 7.2.16
@kevinpapst kevinpapst added the bug label Apr 24, 2019
@kevinpapst
Copy link
Member

I rarely use the calendar myself, so thanks for letting me know.
The businessHours are currently ONLY used for highlighting the area in the calendar itself. But its a good idea to use them for the time pre-fill.

@kevinpapst kevinpapst added this to the 1.0 milestone Apr 29, 2019
@kevinpapst kevinpapst mentioned this issue May 13, 2019
4 tasks
@cbellersen
Copy link

The problem also occurs from the day-view of the calendar. The difference seems to be, that the URL parameters are quite different between month view and day/week view.

Month view (works):
http://kimai.plan-a.de/en/timesheet/create?origin=calendar&begin=2019-05-17

Day and week view (does not work):
http://kimai.plan-a.de/en/timesheet/create?from=2019-05-17T13:00:00&to=2019-05-17T13:30:00

So in day and week view, the "origin=calendar" parameter is missing and "from" instead of "begin" is sent.

@kevinpapst
Copy link
Member

Thanks for the info!
I am working on a major calendar refactoring, which will also cover these issues.
If you would like to help, please test #784

kevinpapst added a commit that referenced this issue May 18, 2019
@kevinpapst
Copy link
Member

Thanks for your report and investigation. Calendar improvements are merged to master.

@cbellersen
Copy link

cbellersen commented May 20, 2019 via email

@lock
Copy link

lock bot commented Jul 19, 2019

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 Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants