disqus_migration_plugins_alter() should not assume that migrate_drupal is enabled

Created on 13 September 2023, 10 months ago

Problem/Motivation

List of migrations fails when disqus is enabled, but (core) migrate_drupal is not.

Steps to reproduce

  1. Uninstall disqus (if it is enabled)
  2. Enable migrate, migrate_tools and migrate_plus modules
  3. Create a migration
  4. Enable disqus
  5. Go to admin/structure/migrations
  6. List of migrations is empty

Why this happens:

in function disqus_migration_plugins_alter():

<?php

  $disqus_plugin = DisqusDeriver::getSourcePlugin('disqus_enabled_content_types');
  assert($disqus_plugin instanceof DrupalSqlBase);

?>

Full class name of DrupalSqlBase is Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase, so, if migrate_drupal is not installed, $discus_plugin won't be created, resulting in an empty list of migrations.

Proposed resolution

Check that migrate_drupal is enabled

Remaining tasks

Write the patch

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria valthebald Sofia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024