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

Not nullable setter for endtime #2487

Closed
runner78 opened this issue Jun 3, 2024 · 4 comments
Closed

Not nullable setter for endtime #2487

runner78 opened this issue Jun 3, 2024 · 4 comments

Comments

@runner78
Copy link

runner78 commented Jun 3, 2024

Bug Report

The setter of the property "endtime" in the News Model has the non-nullable type "Datetime"

Environment

  • news version: [11.4.2]
  • Is your TYPO3 installation set up with Composer (Composer Mode): [yes]

Possible Solution
No type for the parameter or make it nullable.

@georgringer
Copy link
Owner

wanna make it nullable?

@runner78
Copy link
Author

runner78 commented Jun 5, 2024

If you create/edit news in your own extension, this can lead to problems, because you can no longer delete endtime once it has been set, or in my case the field is sent as null and an exception is thrown during mapping.
It is also inconsistent with the other setters because other date fields do not have a typed setter and the setter does not correspond to the actual nullable property.
I would suggest either making all setters without types or all with the correct type.

@keessonnema
Copy link

+1. Running into the same issue as @runner78 when extending news models.
It would be very helpful if endtime was nullable.

@georgringer
Copy link
Owner

be aware that extbase can handle null datetime values in setters only since 13.2, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/83839

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

No branches or pull requests

3 participants