Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#7755 closed defect (bug) (wontfix)

Query post like p=xxx?cat=zzz

Reported by: arena Owned by:
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords: wp_query
Cc: Focuses:

Description

the post is retrieved with a query_post which is p=xxx?cat=zzz

the issue is that WordPress retrieves the post xxx even if the post is not in the category zzz ....

Could it be a WP bug ?

Change History (5)

#1 @jacobsantos
18 years ago

No. Most likely WordPress thinks you're doing it wrong and correcting it for you. It is a feature to prevent id ten t errors.

#2 @jacobsantos
18 years ago

  • Keywords wp_query added

#3 @jacobsantos
18 years ago

  • Milestone 2.72.8

No patch, not confirmed.

#4 @jacobsantos
18 years ago

  • Priority highnormal
  • Severity majornormal

#5 @DD32
18 years ago

  • Milestone 2.8
  • Resolutionwontfix
  • Status newclosed

I'm going to close this as a wontfix, AFAIK, WordPress takes the highest ranking information it can in order to retrieve the post, If the ID is presented, it dives straight to that ID, much less work than doing a SQL Join to determine the category's posts, and then matching against the ID.

And given that WordPress should never generate that URL itself, does it need to be taken into account?

Some modifications to the canonical redirect code could be implemented to redirect queries like that to ?p=xx though possibly.

Note: See TracTickets for help on using tickets.