During QA of the new searching and sorting features (which are great!) we found a weird edge-case that can arise when using both together.

From Entity Share:

  1. search sharable content for 'test' (notice that only content with 'test' in the title appear
  2. clear the search input and press Return (notice that all options show again)
  3. search sharable content again for 'test'
  4. click the table header LABEL to sort by label (notice that the URL changes to show both the search and the sort queries)
  5. clear the search input and press Return - notice that you still only see content with 'test' in the title and the URL still shows the search query for 'test'

Attached is a video demonstrating this behavior.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch created an issue. See original summary.

Grimreaper’s picture

Assigned: Unassigned » Grimreaper
Grimreaper’s picture

Assigned: Grimreaper » Unassigned
Status: Active » Needs review
FileSize
1.29 KB

Thanks @quicksketch for the testing.

I found where the problem was, here is a patch to fix it.

But as it is still in an Ajax refresh of the form, the searched test will still be in the URL but not taken into account.

Waiting your feedbacks before merging.

Thanks for the review.

quicksketch’s picture

Status: Needs review » Reviewed & tested by the community

This works!

> But as it is still in an Ajax refresh of the form, the searched test will still be in the URL but not taken into account.

Yeah, it would be nice if core provided an AJAX command to update the browser history so we could do the same thing as table sorts do.

  • Grimreaper authored cf77793 on 8.x-2.x
    Issue #3088871 by quicksketch, Grimreaper: Searching and Sorting Can...
Grimreaper’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the feedback!

This is merged now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.