Fix Warning Format Editors

Created on 19 April 2024, 8 months ago
Updated 3 May 2024, 8 months ago

Problem/Motivation

Upon opening the Migrate Wizard Settings > Manage Mapping Format Editors section, several warnings are triggered, which initially appear to be within a foreach loop and cannot find the property.

Steps to reproduce

1. Open the Migrate Wizard Settings.
2. Navigate to Manage Mapping Format Editors.
3. Observe the warnings triggered.

Proposed resolution

The issue arises from calling the "format" property when it is actually an array.

In /src/Form/MigrateWizardMappingForm.php, from Line 104 to 112, add the following code:

      $format = $origin_format["format"];
      $current_formats_value = $current_config[$format] ?? '';

      $form['format'][$format] = [
        '#type' => 'select',
        '#title' => t('Origin Format  @format', ['@format' => $format]),
        '#options' => $current_formats_array,
        '#value' => $current_formats_value,
      ];

Remaining tasks

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇸Spain whereiam

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