Legacy Knowledge Base
Published Jun. 30, 2025

Submitting a Form with an object that has a non-mandatory date and time field fails with an error

Written By

Ahmed Abdin

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

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:

  1. 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.

  2. 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.

  3. 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.
Did this article resolve your issue ?

Legacy Knowledge Base