I get the following error when generating content with a value in the "Maximum number of comments per node." field.

Fatal error: Call to undefined method stdClass::save() in ...drupal-8.x-dev/core/modules/comment/comment.module on line 1442

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilson3’s picture

Also hitting this error, tested with both 'testing' install profile plus node+comment modules enabled by hand, as well as the 'standard' install profile on core 8.x branch.

clemens.tolboom’s picture

Status: Active » Needs review
FileSize
1.9 KB

As comments are now of class Comment we need to use it.

Attached patch reordered the creation of pid and uses entity_create().

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Do other entities need updating (hint hint)?

clemens.tolboom’s picture

Good point ... I'll have to fix first 'drush entity' #1429040: entity-read fails on Drupal 8. If so we will post more bugs over here.

salvis’s picture

salvis’s picture

Status: Reviewed & tested by the community » Closed (duplicate)