Issue
-
I have an issue with the Objects used in a Form container. I create an Object with a Date and Time field, then I create a content page, add to it a Form container fragment, and select the Object to create the form. After publishing the Page, if I try to submit the form without adding any date and time, an error is thrown in the log.
Reproduction Steps:
-
Go to Control Panel → Objects → Add a new custom object
-
Go to Fields tab → Add a “Date and Time“ not required field.
-
Publish the Custom Object.
-
-
Go to the Liferay DXP site and add a Content Page
-
Add a Form Container to the page and map it to the created Object
-
Publish the Page.
-
-
Visit the created page in VIEW mode and submit the form without filling in the field.
Expected Result: The form should be submitted successfully without any errors.
Actual Result: The page is refreshed, the form is not submitted, and an error in the log appears. See the below snippet:
WARN [http-nio-8080-exec-2][code_jsp:161] {code="500", msg="", uri=/c/portal/edit_info_item}
javax.servlet.ServletException: java.time.format.DateTimeParseException: Text '' could not be parsed at index 0
Environment
- Liferay DXP 7.4. Quarterly Release 2024.Q1
Resolution
- The issue has been addressed and resolved by LPD-27184. Please request a hotfix.