#18094 closed defect (bug) (fixed)

Changing pages in Theme Search loses selected features

Reported by: lorthirk Owned by: ryan
Priority: normal Milestone: 3.4
Component: Administration Version: 3.2.1
Severity: normal Keywords: has-patch early
Cc: cm0901@…, teraom, kpayne@…

Description

Using Wordpress 3.2.1.

I search for a theme using Feature search (e.g. color: brown). 133 themes (5 pages) are returned. Skipping on page 2 shows, instead all the themes (1.411, 48 pages) regardless of the features selected before.

As a side note, here's the url pointed by the "next page" button: <wordpress-root>/wp-admin/theme-install.php?tab=search&paged=2

Attachments (2)

18094.patch (1.7 KB) - added by SergeyBiryukov 22 months ago.
18094.input_question.png (202.3 KB) - added by kurtpayne 20 months ago.
What is this input for?

Download all attachments as: .zip

Change History (16)

More troubleshooting: after the first search, if I click "search" again (thus repeating the same search), pagination works correctly. So the problem occurs only coming from the "search" tab. I did some debugging of POST parameters, and they are different:

Coming from "Search" tab (not working):

QueryString is: ?tab=search

Form data contains:

features%5Bbrown%5D:brown, search:Trova temi

Instead, clicking again on "search" on the results tab (Working):

QueryString is: tab=search&type=tag&s=brown&search=Cerca

No form data in this case.

  • Cc cm0901@… added
  • Keywords needs-patch added

On a related note, the page number input is broken since it's not inside a form.

  • Milestone changed from Awaiting Review to 3.2.2
  • Cc teraom added

Newbie to WP dev.

The problem occurs because the basic search and the feature filter search use POST and GET types respectively. When using post, the features[] is set in POST, which is not set in URL. The generic pagination WP_List_Table -> pagination function is ignorant of the POST variables and only appends "paged" to the URL.

Possible (naive) solutions:

  1. Check of form action type is POST, redirect to the corresponding GET URL
  2. Generic helper function append_pagination_args, which can attach more vars to the URL?
Version 0, edited 22 months ago by teraom (next)
  • Keywords has-patch added; needs-patch removed

What is this input for?

  • Cc kpayne@… added

Tested and verified that it works with latest trunk.

The page number input, however, did not seem to be connected to any events or forms. See 18094.input_question.png for a picture. What is this input for? If this is just for visual feedback, should it be blurred immediately upon input?

Good catch. To be clear, this currently happens without the patch too, and on "Install Plugins" screen as well. There's no form around that input on these screens.

Probably needs a new ticket.

comment:10 in reply to: ↑ 9   kurtpayne20 months ago

@SergeyBiryukov, you are correct. The non-functioning page input happens in 3.2.1 and is unrelated to this patch.

As you suggested, I created ticket #18724 for this bug.

I found no other defects in my testing of 18094.patch.

  • Keywords early added
  • Milestone changed from 3.2.2 to Future Release
  • Milestone changed from Future Release to 3.4
  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [19857]:

Change feature filter from post to get so feature selections aren't lost when paging. Props SergeyBiryukov. fixes #18094

Note: See TracTickets for help on using tickets.