Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291155

Log message if migration_lookup skips on empty

$
0
0

Problem/Motivation

Continuing from https://www.drupal.org/project/drupal/issues/2951715#comment-12559059
Log message if migration_lookup skips on empty

core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php:248:      
throw new MigrateSkipProcessException();

The skip occurs only in the case when there are multiple source_ids. What should be the text of the error message?

      if (isset($this->configuration['source_ids'][$migration_id])) {
        $configuration = ['source' => $this->configuration['source_ids'][$migration_id]];
        $value = $this->processPluginManager
          ->createInstance('get', $configuration, $this->migration)
          ->transform(NULL, $migrate_executable, $row, $destination_property);
      }
      if (!is_array($value)) {
        $value = [$value];
      }
      $this->skipOnEmpty($value);

And we have a blocker for this is
https://www.drupal.org/project/drupal/issues/2959125

The blocker was closed as Closed (cannot reproduce)

Proposed resolution

Log a message to MigrateSkipRowException to clearly explain why the row is skipped.
So far, the following messages have been proposed.

  • 'Skipped processing because of its not an array'
  • 'The migration process is skipped because the value is FALSE.'
  • 'The migration lookup process skipped because the source_ids array is empty.'
  • 'The migration lookup process skipped because the result was empty.'

The latest patch in #28 uses a message of this form, "Migration lookup in migration '%s' skipped migration '%s' with input value '%s'"

Anyone have a recommendation for a better error message?

Remaining tasks

Confirm the error message.
Patch
Review
Commit

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 291155

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>