Miration process UI assumes default_value is text

Created on 10 April 2024, 9 months ago
Updated 11 April 2024, 9 months ago

Problem/Motivation

Unable to view the Process steps for the migrations 'd7_field_formatter_settings' or 'upgrade_d7_search_page'.
Log contains error: TypeError: strlen(): Argument #1 ($string) must be of type string, array given in strlen() (line 395 of /var/www/d10/web/core/lib/Drupal/Component/Utility/Unicode.php).

Steps to reproduce

  1. Start with a bare Drupal 10 installation
  2. Install module migrate_tools and its dependencies
  3. Navigate to view the process steps for the 'd7_field_formatter_settings' migration
  4. (for me the path is /admin/structure/migrate/manage/migrate_drupal_7/migrations/upgrade_d7_field_formatter_settings/process )
  5. WSOD and error message generated

Proposed resolution

The problem appears to be that the code at line 202 of \Drupal\migrate_tools\Controller\MigrationController::process() assumes that $process_line[0]['default_value'] is a string. But for 'd7_field_formatter_settings' the default for "options/settings" is [].

I suggest that if $process_line[0]['default_value'] is not a string then print_r() its value. I know this is a naive approach, but [] is the only non-string value I can find that is assigned to default_value (among the contributed modules I use) so it seems adequate.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.0

Component

Code

Created by

🇦🇺Australia kenwest

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024