Opened 13 years ago
Closed 13 years ago
#18094 closed defect (bug) (fixed)
Changing pages in Theme Search loses selected features
Reported by: | lorthirk | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.2.1 |
Component: | Administration | Keywords: | has-patch early |
Focuses: | Cc: |
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)
Change History (16)
#3
@
13 years ago
- Keywords needs-patch added
On a related note, the page number input is broken since it's not inside a form.
#6
@
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:
- Check of form action type is POST, redirect to the corresponding GET URL
- Generic helper function append_pagination_args, which can attach more vars to the URL?
#8
@
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:
↓ 10
@
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.
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.