WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 18 months ago

Last modified 18 months ago

#123 closed defect (worksforme)

"comment_content" needs to be set when creating comments

Reported by: Viper007Bond Owned by:
Milestone: Priority: normal
Component: Test Framework Keywords:
Cc:

Description

My console fills up with errors like this when running tests:

                        <code>INSERT INTO `wptests_comments` (`comment_post_ID`,
`comment_author`,`comment_author_url`,`comment_author_IP`,`comment_date`,`commen
t_date_gmt`,`comment_karma`,`comment_approved`,`comment_type`,`comment_parent`,`
user_id`) VALUES (1952,&#039;Commenter 67&#039;,&#039;http://example.com/67/&#03
9;,&#039;&#039;,&#039;2012-08-20 21:46:15&#039;,&#039;2012-08-20 21:46:15&#039;,
0,&#039;1&#039;,&#039;&#039;,0,0)</code></p>
                        </div><div id='error'>
                        <p class='wpdberror'><strong>WordPress database error:</
strong> [Field &#039;comment_content&#039; doesn&#039;t have a default value]<br
 />

Attachments (2)

unit-tests-123.patch (488 bytes) - added by Viper007Bond 20 months ago.
This seems to do the trick
123.patch (496 bytes) - added by Viper007Bond 18 months ago.
Don't use random data in test, instead use the built-in incrementor stuff

Download all attachments as: .zip

Change History (6)

Viper007Bond20 months ago

This seems to do the trick

comment:1 scribu18 months ago

  • Component changed from Database to Test Framework

Viper007Bond18 months ago

Don't use random data in test, instead use the built-in incrementor stuff

comment:2 scribu18 months ago

I can't seem to reproduce this.

comment:3 Viper007Bond18 months ago

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

Me either. I guess it related to a slightly older version of MySQL I was running at the time.

comment:4 Viper007Bond18 months ago

FYI I updated my laptop to MySQL 5.5.28 and the errors went away but my desktop which is running 5.5.18 throws this error.

I'll update my desktop too but just noting it here for informational purposes.

Note: See TracTickets for help on using tickets.