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
- Start with a bare Drupal 10 installation
- Install module migrate_tools and its dependencies
- Navigate to view the process steps for the 'd7_field_formatter_settings' migration
- (for me the path is /admin/structure/migrate/manage/migrate_drupal_7/migrations/upgrade_d7_field_formatter_settings/process )
- 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
Issue fork migrate_tools-3439811
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
kenwest CreditAttribution: kenwest commented