Bug #25161
closed
- Status changed from New to Resolved
- Target version set to 2.7.7
What's happening here is WP's "canonical redirect" system. When a query 404s, like commons.gc.cuny.edu/news, WP tries to be helpful by looking for the post you probably meant. In this case, it's finding an old Doc with the slug 'news'.
There's existing logic on the Commons to prevent Docs from being visible at their bare "CPT" URLs. So URLs like /docs/news would redirect to the URL of the Doc embedded in its associated group. It just so happens that this particular Doc is orphaned - it doesn't have an associated group. I'm not sure why this is the case. So you end up with the doubly-undesirable behavior of (a) being redirected to this doc in the first place, and (b) seeing the doc out of the group context.
In https://github.com/cuny-academic-commons/cac/commit/2168c11155c36d275042fdda4ff9fecd8567efc4 I added a blanket restriction such that the canonical redirect lookup shouldn't match a Doc. I've pushed this to production. https://commons.gc.cuny.edu/news now 404s, which is expected behavior as the page does not exist.
Also available in: Atom
PDF