[wp-trac] [WordPress Trac] #45954: Add a extra_tablenav() method to WP_MS_Sites_List_Table
WordPress Trac
noreply at wordpress.org
Thu Oct 3 23:59:50 UTC 2019
#45954: Add a extra_tablenav() method to WP_MS_Sites_List_Table
-------------------------------------+-------------------------------------
Reporter: pbiron | Owner: desrosj
Type: feature request | Status: reopened
Priority: normal | Milestone: 5.3
Component: Networks and Sites | Version: 5.1
Severity: normal | Resolution:
Keywords: has-screenshots has- | Focuses: administration,
patch | multisite
-------------------------------------+-------------------------------------
Changes (by pbiron):
* status: closed => reopened
* resolution: fixed =>
Comment:
Upon further testing, what was committed in [changeset:46211] doesn't
correctly process the query defined by
`WP_MS_Sites_List_Table::extra_tablenav()`.
* in `network/sites.php`, the conditional at L234 should have used the
`$_POST` super global instead of `$_GET`. This caused that branch of
code to never execute. Without that `wp_redirect()` happening, the
"filter" operation a user does results in the sites being filtered
correctly. However, paginating the table after a filter operation results
in the infamous `The link you followed has expired.` error screen.
* with that conditional corrected, using `$_SERVER['REQUEST_URI']` as the
basis for constructing the URL to redirect also results in the `The link
you followed has expired.` error screen when doing a "filter" operation,
because when `$_GET['allblogs']` is set (which it is when using
`$_SERVER['REQUEST_URI']` to construct the redirect URL) a nonce is
checked which does not exist. The redirect needs to include all of
`$_POST` (minus `_wp_http_referer` and `_wpnonce`), as was done in the
original patch.
I wrote the original patch so long ago that I don't remember why I was
checking the conditional in the 1st bullet point above, but it turns out
that conditional doesn't even need to be there and the redirect can
simply be in an `else`.
New patching coming shortly that corrects the above.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45954#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list