Log message if migration_lookup skips on empty

Created on 6 April 2018, over 6 years ago
Updated 2 July 2024, 2 months ago

Problem/Motivation

Continuing from #2951715-30: Log message if static_map plugin skips the row β†’ .

Log message if migration_lookup skips on empty. The method skipOnEmpty was renamed skipInvalid in #2751825: MigrationLookup plugin should accept zero as a legitimate input β†’ and will skip for more cases that the original. It now skips when the input is NULL, FALSE, [] and "".

From original Issue Summary:

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);

Proposed resolution

Log an informational migrate message of the form, "Migration lookup in migration '%s' skipped migration '%s' with input value '%s'.

Remaining tasks

Postponed on ✨ Allow process plugins to stop further processing on a pipeline RTBC
Review
Commit

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom rakesh.gectcr Manchester

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024