diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php index fb1742b..63dd984 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php @@ -34,8 +34,18 @@ public function query() { * {@inheritdoc} */ public function prepareRow(Row $row) { - // This is a backward compatibility layer for the deprecated migrate source - // plugins d6_comment_variable and d6_comment_variable_per_comment_type. + return parent::prepareRow($this->prepareComment($row)); + } + + /** + * This is a backward compatibility layer for the deprecated migrate source + * plugins d6_comment_variable and d6_comment_variable_per_comment_type. + * + * @deprecated in Drupal 8.4.x, to be removed before Drupal 9.0.x. + * @param \Drupal\migrate\Row $row + * @return \Drupal\migrate\Row + */ + protected function prepareComment(Row $row) { if ($this->variableGet('comment_subject_field_' . $row->getSourceProperty('type'), 1)) { // Comment subject visible. $row->setSourceProperty('field_name', 'comment'); @@ -49,7 +59,7 @@ public function prepareRow(Row $row) { // In D6, status=0 means published, while in D8 means the opposite. // See https://www.drupal.org/node/237636. $row->setSourceProperty('status', !$row->getSourceProperty('status')); - return parent::prepareRow($row); + return $row; } /**