Invalid exposed form data not excluded

Created on 30 March 2018, about 7 years ago
Updated 22 January 2023, about 2 years ago

Problem/Motivation

Unfortunately I've forgotten what lead me to fix this :D but the code is clearly nonsensical and this change fixed something. If I have time I'll revert it and test to see.

In the code ViewsExposedForm::submitForm()

  1. initialises $excludes[] on line 153,
  2. adds invalid exposed input keys to it,
  3. and then initialises it again on line 170, thereby deleting the added keys.

The fix is to remove the second $excludes = [...]; on line 170.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom hughworm

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States diegopino

    This bug is still around (6 years!) in 11.x. but both patches are failing bc the tests are not passing once the actual "excluded" elements are no longer part of the raw data and thus removed from the URLs

    e.g here
    https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/views...

    and here at
    ExposedFormRenderTest::testExposedFormRawInput

    The Layout builder one might be just layout builder failing in 10.1 so all needs to be rebased to 11.x-dev
    @quietone since you are already in this, do you want to tackle that or you ok with me giving it a shot?

  • First commit to issue fork.
  • Merge request !11715Invalid exposed form data not excluded β†’ (Open) created by mstrelan
  • Pipeline finished with Failed
    4 days ago
    Total: 423s
    #463879
  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    Converted to an MR, updated line numbers in the IS.

    Fixed \Drupal\Tests\views\Kernel\Plugin\ExposedFormRenderTest::testExposedFormRawInput.

  • Pipeline finished with Success
    4 days ago
    #463885
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Haven't reviewed yet but could the IS be updated too.

    If you are another contributor eager to jump in, please allow the previous poster(s) at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!

Production build 0.71.5 2024