I have a fairly simple D6->D8 migration, and I need a custom source plugin for one of my node migrations. As far as I can tell, I have everything written and structured properly, but when I click on the migration group in the admin UI, I get a message that my source plugin doesn't exist.
Here's the relevant part of my node migration config:
In /my-module/config/install/migrate_plus.migration.video.yml:
id: video
label: Video
migration_tags:
- Drupal 6
deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
migration_group: node
source:
plugin: mrctvVideoSource
node_type: video
process:
and my source plugin in /my_module/src/Plugin/migrate/source/mrctvVideoSource.php:
namespace Drupal\migrate_mrctv\Plugin\migrate\source;
use Drupal\migrate\Plugin\migrate\source\SqlBase;
use Drupal\migrate\Row;
/**
* Source plugin for MRCTV video nodes.
*
*/
class mrctvVideoSource extends SqlBase {
/**
* @MigrateSource(
* id = "mrctvVideoSource"
* )
*/
public function query() {
return $this->select('view_videos', 'vv')
->fields('vv', array_keys($this->fields()));
}
/**
* {@inheritdoc}
*/
public function fields() {
$fields = [
'video_data' => $this->t('Video Data'),
'thumbnail_data' => $this->t('Thumbnail Data'),
'show_ads' => $this->t('Show Ads'),
'raw_s3_file' => $this->t('Raw S3 File'),
'nid' => $this->t('Node ID'),
'vid' => $this->t('Version ID'),
'title' => $this->t('Nond Title'),
'node_created' => $this->t('Created'),
'node_changed' => $this->t('Changed'),
'node_uid' => $this->t('Node User'),
'node_body' => $this->t('Body'),
'teaser' => $this->t('Teaser'),
'revsion_uid' => $this->t('Revision UID'),
'log' => $this->t('Revision Log'),
'timestamp' => $this->t('Revision Timestamp'),
];
return $fields;
}
}
From what I can tell, I have everything named and annotated properly and in the correct locations, but I'm obviously missing something. What is it?
Thanks.
UPDATE: Per Mike Ryans'suggestion below, I changed the id of my plugin (after clearing cache) from 'mrctvVideoSource' to 'mrctv_video_source', both in the migration yml file and the id annotation in my plugin definition (is there anywhere else I need to change it?). But now, after uninstalling my module (and having to manually delete the config records in the config database again, config_devel doesn't seem to be clearing anything out), my node migrations are not even listed on the Migration page. Sigh. Still troubleshooting...