Problem/Motivation

I can't find the ticket right now but it's due to the URL parameter cleanup. Now that column sort doesn't include filters the reset button no longer appears.

Steps to reproduce

  1. On main or 11.x
  2. Create a view page using a table format
  3. Ensure one of the columns is click sortable
  4. Ensure the reset button is enabled.
  5. Save the view
  6. When viewing the page click the column. Notice the reset never appears.

Proposed resolution

Believe the issue is in ExposedFormPluginBase.php. Need to ensure if order or sort are present reset should appear

Remaining tasks

  1. Make an MR
  2. Right test case
  3. Review

User interface changes

NA

Introduced terminology

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Issue fork drupal-3614737

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

smustgrave created an issue. See original summary.

smustgrave’s picture

Status: Active » Needs review

Added a simple test assert.

dcam’s picture

Status: Needs review » Needs work

This is pretty straightforward. For the record, this bug can be reproduced with the default admin Content view - no need to build one from scratch. Applying the MR fixes the issue.

I left a suggestion for a code comment on the MR.

smustgrave’s picture

Status: Needs work » Needs review

Agreed with the feedback and applied! Thanks!

dcam’s picture

Status: Needs review » Reviewed & tested by the community

I don't have any other feedback. LGTM.

  • catch committed af25ad71 on main
    fix: #3614737 Reset button doesn't appear for table column sort
    
    By:...

  • catch committed 6a85dd37 on 11.5.x
    fix: #3614737 Reset button doesn't appear for table column sort
    
    By:...

  • catch committed 09200405 on 11.x
    fix: #3614737 Reset button doesn't appear for table column sort
    
    By:...

  • catch committed 8e037267 on 12.0.x
    fix: #3614737 Reset button doesn't appear for table column sort
    
    By:...
catch’s picture

Version: main » 11.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and cherry-picked back through to 11.5.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.