Make MigrateSourceInterface::fields() return the correct values

Created on 17 April 2018, about 7 years ago
Updated 15 May 2025, 23 days ago

Problem/Motivation

There are some inconsistencies in fields() method of source plugins. More details:

1) Plugin: d6\ViewMode
Current value:
'display_settings' => $this->t('Serialize data with display settings.'),

And display_settings is not made available at all. The fields made available by ViewMode is an associative array keyed by view mode with two properties, 'entity_type' and 'view_mode'. As in this example:

[
  [entity_type] => node
  [view_mode] => 4
]

2) Plugin: d7\File

  1. 'uri' field is available and not described;
  2. 'filepath' => $this->t('File path'), is not clear enough what the path is really are
  3. If the File Entity β†’ module is installed, then there is another field "type"

3) Plugin: d6\Upload
fid, description, and list keys are not available in the top-level array. They exists as keys of upload sub-arrays.

Proposed resolution

Fix it.

Remaining tasks

Write a patch
review
commit

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

migration system

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone

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

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