#35189 closed defect (bug) (duplicate)
Redirection based on _wp_old_slug postmeta value should first check if there is an active published post with the same slug!
Reported by: | gnotaras | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
I happened to find a published post (postA) being permanently redirected to another post (postB).
After doing some research I found out that postB had a postmeta key _wp_old_slug
equal to the slug of postA. When I deleted that particular postmeta key/value from the database, everything returned back to normal (no redirection).
This must have started happening lately (during the last months).
Shouldn't it be checked whether there is an active published post with a slug equal to the value of a _wp_old_slug
key before performing the actual redirection?
I really have no clue how this postmeta key had been created there in the past. The point is that such a redirection started happening lately and that the way it is done without doing any checks could lead to problems.
Please fix it. Thanks in advance!
Change History (4)
#2
@
9 years ago
- Component changed from General to Query
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi @gnotaras,
Thanks for the report, we're already tracking this issue in #35031.
Also it might be a good idea to never let WP perform permanent redirections by itself, unless it can create a report of such redirections in some way.