We've been receiving code-reporting errors on an events page that was receiving invalid dates submitted through this module. While there can be a number of valid reasons why a user might manually type in a date rather than use the datepicker, there's still a problem in that an uncaught exception can occur when one is submitted to the controller.
Affected: CWP 2.4
Expected: If I submit an "invalid" date in the wrong format, i.e. 19-3-19, I see a friendly error
Actual: If I submit an "invalid" date in the wrong format, i.e. 19-3-19, I'll see an InvalidArgumentException in dev mode or a 500 Server Error page in Live mode
Steps to reproduce on a default CWP 2.4 install:
login to the CMS
publish a new Event Holder Page with some Event Pages under it
Visit the page in the front end
Type 19-3-19 in the From date (make sure to type the dashes)
Type 20-3-19 in the To date (make sure to type the dashes)
We've been receiving code-reporting errors on an events page that was receiving invalid dates submitted through this module. While there can be a number of valid reasons why a user might manually type in a date rather than use the datepicker, there's still a problem in that an uncaught exception can occur when one is submitted to the controller.
Affected: CWP 2.4 Expected: If I submit an "invalid" date in the wrong format, i.e. 19-3-19, I see a friendly error Actual: If I submit an "invalid" date in the wrong format, i.e. 19-3-19, I'll see an InvalidArgumentException in dev mode or a 500 Server Error page in Live mode
Steps to reproduce on a default CWP 2.4 install: