[wp-trac] [WordPress Trac] #30018: 404 error and redirect when using url with query string
WordPress Trac
noreply at wordpress.org
Fri Oct 17 07:11:02 UTC 2014
#30018: 404 error and redirect when using url with query string
-------------------------------+-----------------------------
Reporter: pmwp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.0
Severity: normal | Keywords:
Focuses: |
-------------------------------+-----------------------------
When a query var and the query_var of non-public CPT are the same:
* You will get a 404 error even when the permalink exists.
* redirect_guess_404_permalink() returns the permalink of '''other''' post
which has slug like {query value}%.
Here an example:
* CPT `foo` has `'public' => false`.
* The permalink `/a123` exists.
* The permalink `/bar/456` exists.
When you visit `/a123?foo=4`, You will redirect to '''other''' url
`bar/456?foo=4` and get a 404 error.
I want to get `/a123` page and $_GET[ 'foo' ] which is not the CTP
`query_var`.
I think CTP `query_var` parameter must be set to false, if `public`
parameter is false.
Related tickets: #17609, #19693
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30018>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list