Make WordPress Core

Opened 19 years ago

Closed 14 years ago

Last modified 14 years ago

#5248 closed defect (bug) (invalid)

Missing dot in query.php, category exclusion problem

Reported by: jaroche Owned by: westi
Priority: low Milestone:
Component: Query Version: 2.3
Severity: normal Keywords:
Cc: Focuses:

Description

I found that there's a missing dot when assigns the value to $whichcat in query.php, this interferes with the categories exclusion (generated with $q['category__not_in'] ).

Attachments (4)

query-patch.php (721 bytes ) - added by jaroche 19 years ago.
query-path.php (728 bytes ) - added by jaroche 19 years ago.
5248.diff (992 bytes ) - added by westi 19 years ago.
Patch against trunk
13682.diff (1001 bytes ) - added by jaroche 17 years ago.
Patch against /trunk

Download all attachments as: .zip

Change History (16)

@jaroche
19 years ago

@jaroche
19 years ago

@westi
19 years ago

Patch against trunk

#1 @westi
19 years ago

  • Keywords needs-testing has-patch added
  • Milestone 2.3.12.4

I've updated the patch to catch another case of the same issue.

Needs testing though

Pushing to 2.4 as 2.3.1 is nearly out the door.

#2 @westi
19 years ago

  • Owner changed from anonymous to westi
  • Status newassigned

#3 @ryan
19 years ago

Concatenation is purposefully left off in some place to avoid creating invalid queries. category_name and categorynot_in might work together but category_name and others will not.

#4 @westi
19 years ago

  • Keywords reporter-feedback added

Has this been fixed by [6345] as that issue may have caused problems with these query vars?

#5 @Denis-de-Bernardy
17 years ago

  • Milestone 2.9
  • Resolutioninvalid
  • Status assignedclosed

The lack of dot seems valid. Please re-open with a step by step test case to reproduce if it's still occurring.

@jaroche
17 years ago

Patch against /trunk

#6 @jaroche
17 years ago

  • Cc jaroche added
  • Resolution invalid
  • Status closedreopened

Hello,

I've updated the westi's patch for trunk. This fixes de bug for 2.9.2 and trunk.

To reproduce this bug:

  1. Create a single plugin that adds:
    $query->set('cat','-$categoryidtoexclude');
    
  2. Visit the category 'A' page (/category/a/) with posts categorized 'B', where category 'B' has been excluded.

#7 @scribu
17 years ago

  • Component GeneralQuery
  • Milestone3.0

#8 @dd32
16 years ago

  • Keywords query reporter-feedback removed
  • Milestone 3.03.1

You can also duplicate this with a url such as:

http://localhost/wordpress-commit/category/some-category/?cat=-1

Any posts in both will show, whereas you'd expect it to skip some.

However, I'm still going to push this out of 3.0 due to impending beta. I believe there are some other taxonomy query tickets which would be ideal to patch at the same time.

#9 @nacin
16 years ago

  • Milestone Awaiting TriageFuture Release

#10 @wonderboymusic
14 years ago

  • Keywords needs-testing has-patch removed
  • Resolutioninvalid
  • Status reopenedclosed

This code has been wiped out by time, no longer exists

#11 @helenyhou
14 years ago

  • Milestone Future Release
Note: See TracTickets for help on using tickets.