Make WordPress Core

Opened 20 years ago

Closed 20 years ago

#1331 closed defect (bug) (fixed)

SQL Error with list_cats

Reported by: mikelittle's profile mikelittle Owned by: matt's profile matt
Milestone: Priority: normal
Severity: major Version: 1.5.1
Component: Template Keywords:
Focuses: Cc:

Description

Change 2551 http://trac.wordpress.org/changeset/2551 introduced an SQL error in function list_cats with $optiondates switched on.

The query on line 291 tries to select cat_ID from wp_posts joined with wp_post2cat. This latter table only has column category_id.
The reference to the results on line 297 needs changingb too.

--

Attachments (1)

template-functions-category.php.diff (721 bytes) - added by mikelittle 20 years ago.

Download all attachments as: .zip

Change History (4)

#1 @mikelittle
20 years ago

  • Patch set to No

Turn on optiondates in a call to list_cats
i.e. call wp_list_cats('optiondates=1') in your template.
SQL error will result.

#2 @mikelittle
20 years ago

  • Patch changed from No to Yes

Patch attached.

#3 @matt
20 years ago

  • fixed_in_version set to 1.5.1.1
  • Owner changed from anonymous to matt
  • Resolution changed from 10 to 20
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.