Using: /admin/config/development/generate/content

Generating default Article nodes, you will see drupal die, and then find this in the log:

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'comment_status' cannot be null: INSERT INTO {node__comment} (entity_id, revision_id, bundle, delta, langcode, comment_status) VALUES (:db_insert_placeholder_0...

No content gets generated.

Workaround: Remove the comment field from the content type.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penyaskito’s picture

Status: Active » Needs review
FileSize
478 bytes

This looks like a problem in core. Failing test here first.

Status: Needs review » Needs work

The last submitted patch, 1: comment-failure.patch, failed testing.

willzyx’s picture

penyaskito’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: devel-generate-comment-failure-2422013-3.patch, failed testing.

andypost’s picture

willzyx’s picture

Rerolled patch from #3

willzyx’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: devel-generate-comment-failure-2422013-7.patch, failed testing.

andypost’s picture

Manuel Garcia’s picture

Status: Needs work » Needs review

  • willzyx committed e983352 on 8.x-1.x
    Issue #2422013 by willzyx, penyaskito: Integrity constraint violation -...
willzyx’s picture

Status: Needs review » Fixed

Committed/pushed to the 8.x version. Thanks

valgibson’s picture

Status: Fixed » Needs work
FileSize
68.78 KB

Problem/Motivation

Reopening this issue as I'm still encountering the same problem as originally stated. Steps I undertook to reproduce the issue:

  1. Did a clean install of drupal 8 beta 9 version
  2. Installed devel and devel_generate 8.x-1.x-dev
  3. Going to admin/config/development/generate/content to generate content
  4. Select all content types to generate content from
  5. Execute degenerate content

Error appears (view attachment).

Message from my php error log:

"SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'comment_status' cannot be null: INSERT INTO {node__comment} (entity_id, revision_id, bundle, delta, langcode, comment_status) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5);

Note: this only happens when creating content from the Article content type. Basic page is creating content as expected.

clemens.tolboom’s picture

@valgibson you need to use drupal head for this to test. The core issue is resolved on 2015-Apr-8 while beta 9 is from 2015-Mar-25

willzyx’s picture

Status: Needs work » Fixed

@valgibson this issue has been fixed in core (see #2422101: CommentItem should override the generateSampleValue method and provide sample values for more details) on April 8, 2015 at 1:41pm.
Make sure to use the HEAD version of drupal 8 or at least a version released after the fix.

Feel free to open onother issue if you think that this problem still exists.
Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.