WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years 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 3 years ago.
This seems to do the trick
123.patch (496 bytes) - added by Viper007Bond 3 years ago.
Don't use random data in test, instead use the built-in incrementor stuff

Download all attachments as: .zip

Change History (6)

@Viper007Bond3 years ago

This seems to do the trick

comment:1 @scribu3 years ago

  • Component changed from Database to Test Framework

@Viper007Bond3 years ago

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

comment:2 @scribu3 years ago

I can't seem to reproduce this.

comment:3 @Viper007Bond3 years 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 @Viper007Bond3 years 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.