Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#2431 closed defect (bug) (invalid)

Categories cause database errors when they contain apostrophes (').

Reported by: normal1's profile normal1 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords:
Focuses: Cc:


I created a category called How-to's. When accessing the how-tos page directly to view it's posts I get this error:

WordPress database error: [syntax error near 's', url = '%2Fuser%2Fcategory%2Fhow-tos%2F' WHERE username='admin'' at line 1]
UPDATE wp_useronline SET timestamp = '1139652245', ip = '', location = 'My last name, My story » How-to's', url = '%2Fuser%2Fcategory%2Fhow-tos%2F' WHERE username='admin'

WordPress database error: [syntax error near 's', '%2Fuser%2Fcategory%2Fhow-tos%2F')' at line 1]
INSERT INTO wp_useronline VALUES ('1139652245', 'admin', '', 'My last name, My story » How-to's', '%2Fuser%2Fcategory%2Fhow-tos%2F')

This tells me that the database is freaking out about the 's in the "How-to's" name of the category. This should not happen.

Also, I should point out that these errors go away when the name of the category is escaped by using a \ - i.e. How-to\'s - However it still shows the category listed as How-to\'s on the main page.


Change History (1)

#1 @davidhouse
18 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Invaild. That error is caused by the Users Online plugin, it worksforme without that plugin installed. Take it up with the plugin author.

(I should point out that "How-to's" is an incorrect usage of the apostrophe anyway :))

Note: See TracTickets for help on using tickets.