Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#18094 closed defect (bug) (fixed)

Changing pages in Theme Search loses selected features

Reported by: lorthirk's profile lorthirk Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.2.1
Component: Administration Keywords: has-patch early
Focuses: Cc:


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 13 years ago.
18094.input_question.png (202.3 KB) - added by kurtpayne 13 years ago.
What is this input for?

Download all attachments as: .zip

Change History (16)

#1 @lorthirk
13 years ago

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.

#2 @lorthirk
13 years ago

  • Cc cm0901@… added

#3 @kawauso
13 years ago

  • Keywords needs-patch added

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

#4 @nacin
13 years ago

  • Milestone changed from Awaiting Review to 3.2.2

#5 @teraom
13 years ago

  • Cc teraom added

#6 @teraom
13 years ago

Newbie to WP dev.

The problem occurs because the basic search and the feature filter search use GET and POST 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?
Last edited 13 years ago by teraom (previous) (diff)

#7 @SergeyBiryukov
13 years ago

  • Keywords has-patch added; needs-patch removed

13 years ago

What is this input for?

#8 @kurtpayne
13 years ago

  • 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?

#9 follow-up: @SergeyBiryukov
13 years ago

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.

#10 in reply to: ↑ 9 @kurtpayne
13 years 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.

#11 @ryan
12 years ago

  • Keywords early added
  • Milestone changed from 3.2.2 to Future Release

#13 @ryan
12 years ago

  • Milestone changed from Future Release to 3.4

#14 @ryan
12 years ago

  • 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.