WSOD error page when values enter are not in the right format

Created on 4 October 2023, about 1 year ago
Updated 1 February 2024, 10 months ago

Problem/Motivation

The "Views year filter" modules work as expected the one thing I noted was the error message that is displayed when an incorrect value is provide.

Steps to reproduce

1. Enable the module and uncheck the enable the "Use Bootstrap Datepicker" option
2. Go to your view, add the date filter (expose this filter) and select the "A date in CCYY format." option
3. On the view page when you enter value that is not a number it throws WSOD error page (screenshot attached)
4. Example - the search works when you enter a value say 2023 but you get an error page when you enter values like "2023" (i.e. including double quote) or any text/garbage value (ex - year 2023 or loremipsum)

Proposed resolution

Can we show a user friendly error message when any unexpected value formats are entered?

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @icf-vpathak
  • 🇫🇷France berramou

    Hello @icf-vpathak,
    Thank you for you reporting, can you please add the error message or the screenshot.

  • Status changed to Closed: cannot reproduce 10 months ago
  • 🇯🇵Japan tyler36 Osaka

    Can not reproduce on Drupal 10.1.5 with Views Year Filter 2.1.2

    ## Test

    1. Install Drupal 10
    2. Install Views Year Filter
    3. Create 3 articles with created date set as 2024-02-01, 2022-02-01, 2023-002-01
    4. Create new view page ("/articles" with filter
    - Filter: Content: Authored on (exposed) with "equal to" "A date in CCYY format".
    5. Visit "/articles" page and enter 2023.
    - View should show 1 article.
    6. Search for "2023".
    - View shows no results because no dates match "2023"
    - No error/WSOD is displayed

Production build 0.71.5 2024