WSOD when filtering by Date field

Created on 13 January 2025, 6 months ago

Core 10.4.1
PHP 8.3.15
+ manual patches per https://www.drupal.org/project/token_views_filter/issues/3419264 πŸ› A typo in the code Active

When attempting to view & edit a View filtered by a Date field a WSOD results.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States drupgirl

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

Comments & Activities

  • Issue created by @drupgirl
  • πŸ‡ΊπŸ‡ΈUnited States drupgirl
  • πŸ‡ΊπŸ‡ΈUnited States drupgirl

    To fix, add : void to line 32.

    public function validateExposed(&$form, FormStateInterface $form_state) : void {

  • I am facing the same error while upgrading to Drupal 11.2

  • πŸ‡¦πŸ‡ΉAustria maxilein

    I am facing the same error while upgrading to Drupal 11.2 running drush updb

    ------------------- ----------------- --------------- ------------------------
    Module Update ID Type Description
    ------------------- ----------------- --------------- ------------------------
    system 11200 hook_update_n 11200 - Add a [time]
    column to the
    {simpletest} table, if
    existing.
    system 11201 hook_update_n 11201 - Add the
    [alias] field to the
    {router} table.
    block set_menu_block_ post-update Updates the `depth`
    depth_to_null_i setting to NULL if it
    f_zero is 0 in any menu
    blocks.
    file add_playsinline post-update Adds a value for the
    'playsinline' setting
    of the 'file_video'
    formatter.
    system convert_empty_d post-update Updates
    escription_enti entity_form_mode
    ty_form_modes_t descriptions from
    o_null empty string to null.
    system remove_path_key post-update Remove path key in
    system.file.
    update clear_disk_cach post-update Removes the legacy
    e 'Update Manager' disk
    cache.
    views_data_export xml_encoding post-update Post update data
    export views to
    preserve original XML
    encoding.
    views block_items_per post-update Defaults
    _page `items_per_page` to
    NULL in Views blocks.
    views table_css_class post-update Adds a default table
    CSS class.
    views update_remember post-update Clean-up empty
    _role_empty remember_roles display
    settings for views
    filters.
    ------------------- ----------------- --------------- ------------------------

    β”Œ Do you wish to run the specified pending updates? ───────────┐
    β”‚ Yes β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    > [notice] Update started: system_update_11200
    > [notice] Update completed: system_update_11200
    > [notice] Update started: system_update_11201
    > [notice] Update completed: system_update_11201
    > [notice] Update started: block_post_update_set_menu_block_depth_to_null_if_zero
    > [notice] Update completed: block_post_update_set_menu_block_depth_to_null_if_zero
    > [notice] Update started: file_post_update_add_playsinline
    > [notice] Update completed: file_post_update_add_playsinline
    > [notice] Update started: system_post_update_convert_empty_description_entity_form_modes_to_null
    > [notice] Update completed: system_post_update_convert_empty_description_entity_form_modes_to_null
    > [notice] Update started: system_post_update_remove_path_key
    > [notice] Update completed: system_post_update_remove_path_key
    > [notice] Update started: update_post_update_clear_disk_cache
    > [notice] Update completed: update_post_update_clear_disk_cache
    > [notice] Update started: views_data_export_post_update_xml_encoding
    > [notice] Update completed: views_data_export_post_update_xml_encoding
    > [notice] Update started: views_post_update_block_items_per_page
    > [notice] Update completed: views_post_update_block_items_per_page
    > [notice] Update started: views_post_update_table_css_class
    > PHP Fatal error: Declaration of Drupal\token_views_filter\TokensDateFilterTrait::validateExposed(&$form, Drupal\Core\Form\FormStateInterface $form_state) must be compatible with Drupal\datetime\Plugin\views\filter\Date::validateExposed(&$form, Drupal\Core\Form\FormStateInterface $form_state): void in /var/www/web/modules/contrib/token_views_filter/src/TokensDateFilterTrait.php on line 32
    > [warning] Drush command terminated abnormally.

    In ProcessBase.php line 155:

    Output is empty.

  • πŸ‡¦πŸ‡ΉAustria maxilein

    Uplifted bug, because it block site upgrade.

  • πŸ‡¦πŸ‡ΉAustria drupalfan2

    Patch file attached

Production build 0.71.5 2024