reverted: --- b/core/modules/block/src/Plugin/migrate/source/d6/Block.php +++ a/core/modules/block/src/Plugin/migrate/source/d6/Block.php @@ -75,7 +75,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $row->setSourceProperty('default_theme', $this->defaultTheme); $row->setSourceProperty('admin_theme', $this->adminTheme); $module = $row->getSourceProperty('module'); @@ -125,6 +124,7 @@ break; } $row->setSourceProperty('settings', $settings); + return parent::prepareRow($row); } /** * {@inheritdoc} reverted: --- b/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php +++ a/core/modules/comment/src/Plugin/migrate/source/d6/Comment.php @@ -38,7 +38,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); if ($this->variableGet('comment_subject_field_' . $row->getSourceProperty('type'), 1)) { // Comment subject visible. $row->setSourceProperty('field_name', 'comment'); @@ -51,6 +50,7 @@ // 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); } /** diff -u b/core/modules/contact/src/Plugin/migrate/source/d6/ContactCategory.php b/core/modules/contact/src/Plugin/migrate/source/d6/ContactCategory.php --- b/core/modules/contact/src/Plugin/migrate/source/d6/ContactCategory.php +++ b/core/modules/contact/src/Plugin/migrate/source/d6/ContactCategory.php @@ -42,8 +42,8 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $row->setSourceProperty('recipients', explode(',', $row->getSourceProperty('recipients'))); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/field/src/Plugin/migrate/source/d6/Field.php +++ a/core/modules/field/src/Plugin/migrate/source/d6/Field.php @@ -69,7 +69,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Unserialize data. $global_settings = unserialize($row->getSourceProperty('global_settings')); $widget_settings = unserialize($row->getSourceProperty('widget_settings')); @@ -77,6 +76,7 @@ $row->setSourceProperty('global_settings', $global_settings); $row->setSourceProperty('widget_settings', $widget_settings); $row->setSourceProperty('db_columns', $db_columns); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php +++ a/core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php @@ -57,7 +57,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Unserialize data. $widget_settings = unserialize($row->getSourceProperty('widget_settings')); $display_settings = unserialize($row->getSourceProperty('display_settings')); @@ -65,6 +64,7 @@ $row->setSourceProperty('widget_settings', $widget_settings); $row->setSourceProperty('display_settings', $display_settings); $row->setSourceProperty('global_settings', $global_settings); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/file/src/Plugin/migrate/source/d6/File.php +++ a/core/modules/file/src/Plugin/migrate/source/d6/File.php @@ -75,10 +75,10 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $row->setSourceProperty('file_directory_path', $this->filePath); $row->setSourceProperty('temp_directory_path', $this->tempFilePath); $row->setSourceProperty('is_public', $this->isPublic); + return parent::prepareRow($row); } /** diff -u b/core/modules/file/src/Plugin/migrate/source/d6/Upload.php b/core/modules/file/src/Plugin/migrate/source/d6/Upload.php --- b/core/modules/file/src/Plugin/migrate/source/d6/Upload.php +++ b/core/modules/file/src/Plugin/migrate/source/d6/Upload.php @@ -41,13 +41,13 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $query = $this->select('upload', 'u') ->fields('u', array('fid', 'description', 'list')) ->condition('u.nid', $row->getSourceProperty('nid')) ->orderBy('u.weight'); $query->innerJoin('node', 'n', static::JOIN); $row->setSourceProperty('upload', $query->execute()->fetchAll()); + return parent::prepareRow($row); } /** diff -u b/core/modules/file/src/Plugin/migrate/source/d7/File.php b/core/modules/file/src/Plugin/migrate/source/d7/File.php --- b/core/modules/file/src/Plugin/migrate/source/d7/File.php +++ b/core/modules/file/src/Plugin/migrate/source/d7/File.php @@ -63,7 +63,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Compute the filepath property, which is a physical representation of // the URI relative to the Drupal root. $path = str_replace(['public:/', 'private:/', 'temporary:/'], [$this->publicPath, $this->privatePath, $this->temporaryPath], $row->getSourceProperty('uri')); @@ -72,6 +71,7 @@ // the source_base_path in order to make them all relative. $path = str_replace($this->migration->get('destination.source_base_path'), NULL, $path); $row->setSourceProperty('filepath', $path); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php +++ a/core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php @@ -45,7 +45,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $filters = array(); $roles = $row->getSourceProperty('roles'); $row->setSourceProperty('roles', array_values(array_filter(explode(',', $roles)))); @@ -87,6 +86,7 @@ } $row->setSourceProperty('filters', $filters); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLink.php +++ a/core/modules/menu_link_content/src/Plugin/migrate/source/d6/MenuLink.php @@ -93,9 +93,10 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $row->setSourceProperty('options', unserialize($row->getSourceProperty('options'))); $row->setSourceProperty('enabled', !$row->getSourceProperty('hidden')); + + return parent::prepareRow($row); } /** reverted: --- b/core/modules/migrate_drupal/src/Plugin/migrate/source/VariableMultiRow.php +++ a/core/modules/migrate_drupal/src/Plugin/migrate/source/VariableMultiRow.php @@ -45,10 +45,10 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); if ($value = $row->getSourceProperty('value')) { $row->setSourceProperty('value', unserialize($value)); } + return parent::prepareRow($row); } /** diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/CckFieldValues.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/CckFieldValues.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/CckFieldValues.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/CckFieldValues.php @@ -71,7 +71,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $bundle = $row->getSourceProperty('type'); // Pick up simple CCK fields. $cck_table = "content_type_$bundle"; @@ -172,6 +171,7 @@ } } } + return parent::prepareRow($row); } /** reverted: --- b/core/modules/node/src/Plugin/migrate/source/d6/Node.php +++ a/core/modules/node/src/Plugin/migrate/source/d6/Node.php @@ -110,12 +110,12 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // format = 0 can happen when the body field is hidden. Set the format to 1 // to avoid migration map issues (since the body field isn't used anyway). if ($row->getSourceProperty('format') === '0') { $row->setSourceProperty('format', $this->filterDefaultFormat); } + return parent::prepareRow($row); } /** reverted: --- b/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php +++ a/core/modules/node/src/Plugin/migrate/source/d6/NodeType.php @@ -99,7 +99,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $row->setSourceProperty('teaser_length', $this->teaserLength); $row->setSourceProperty('node_preview', $this->nodePreview); @@ -112,6 +111,8 @@ $row->setSourceProperty('options', $options); $submitted = isset($this->themeSettings['toggle_node_info_' . $type]) ? $this->themeSettings['toggle_node_info_' . $type] : FALSE; $row->setSourceProperty('display_submitted', $submitted); + + return parent::prepareRow($row); } /** reverted: --- b/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php +++ a/core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php @@ -58,7 +58,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Find parents for this row. $parents = $this->select('term_hierarchy', 'th') ->fields('th', array('parent', 'tid')) @@ -66,6 +65,7 @@ ->execute() ->fetchCol(); $row->setSourceProperty('parent', $parents); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNode.php +++ a/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermNode.php @@ -57,7 +57,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Select the terms belonging to the revision selected. $query = $this->select('term_node', 'tn') ->fields('tn', array('tid')) @@ -65,6 +64,7 @@ $query->join('node', 'n', static::JOIN); $query->innerJoin('term_data', 'td', 'td.tid = tn.tid AND td.vid = :vid', array(':vid' => $this->configuration['vid'])); $row->setSourceProperty('tid', $query->execute()->fetchCol()); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php +++ a/core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php @@ -23,7 +23,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Find node types for this row. $node_types = $this->select('vocabulary_node_types', 'nt') ->fields('nt', array('type', 'vid')) @@ -31,6 +30,7 @@ ->execute() ->fetchCol(); $row->setSourceProperty('node_types', $node_types); + return parent::prepareRow($row); } /** reverted: --- b/core/modules/user/src/Plugin/migrate/source/d6/ProfileField.php +++ a/core/modules/user/src/Plugin/migrate/source/d6/ProfileField.php @@ -48,7 +48,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); if ($row->getSourceProperty('type') == 'selection') { // Get the current options. $current_options = preg_split("/[\r\n]+/", $row->getSourceProperty('options')); @@ -66,6 +65,8 @@ // keys. $row->setSourceProperty('options', array(NULL, NULL)); } + + return parent::prepareRow($row); } /** reverted: --- b/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php +++ a/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php @@ -36,7 +36,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // Find profile values for this row. $query = $this->select('profile_values', 'pv') ->fields('pv', array('fid', 'value')); @@ -60,6 +59,8 @@ $row->setSourceProperty($profile_value['name'], array($profile_value['value'])); } } + + return parent::prepareRow($row); } /** reverted: --- b/core/modules/user/src/Plugin/migrate/source/d6/Role.php +++ a/core/modules/user/src/Plugin/migrate/source/d6/Role.php @@ -68,7 +68,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $rid = $row->getSourceProperty('rid'); $permissions = $this->select('permission', 'p') ->fields('p', array('perm')) @@ -79,6 +78,7 @@ if (isset($this->filterPermissions[$rid])) { $row->setSourceProperty("filter_permissions:$rid", $this->filterPermissions[$rid]); } + return parent::prepareRow($row); } /** reverted: --- b/core/modules/user/src/Plugin/migrate/source/d6/User.php +++ a/core/modules/user/src/Plugin/migrate/source/d6/User.php @@ -53,7 +53,6 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); // User roles. $roles = $this->select('users_roles', 'ur') ->fields('ur', array('rid')) @@ -79,6 +78,8 @@ // Unserialize Data. $row->setSourceProperty('data', unserialize($row->getSourceProperty('data'))); + + return parent::prepareRow($row); } /** reverted: --- b/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php +++ a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php @@ -57,10 +57,10 @@ * {@inheritdoc} */ public function prepareRow(Row $row) { - parent::prepareRow($row); $row->setSourceProperty('filename', basename($row->getSourceProperty('picture'))); $row->setSourceProperty('file_directory_path', $this->filePath); $row->setSourceProperty('temp_directory_path', $this->tempFilePath); + return parent::prepareRow($row); } /** only in patch2: unchanged: --- /dev/null +++ b/core/modules/migrate/tests/migrate_prepare_row_test/migrate_prepare_row_test.info.yml @@ -0,0 +1,6 @@ +name: 'Migrate module prepareRow tests' +type: module +description: 'Support module for source plugin prepareRow testing.' +package: Testing +version: VERSION +core: 8.x only in patch2: unchanged: --- /dev/null +++ b/core/modules/migrate/tests/migrate_prepare_row_test/migrate_prepare_row_test.module @@ -0,0 +1,29 @@ +getSourceProperty('instruction'); + if ($instruction == 'skip_and_record') { + throw new MigrateSkipRowException('', TRUE); + } + elseif ($instruction == 'skip_and_dont_record') { + throw new MigrateSkipRowException('', FALSE); + } +}