Warning messages appear when the CSV's header are not following the suggested headers

Created on 10 May 2023, over 1 year ago
Updated 9 June 2023, over 1 year ago

Problem/Motivation

When uploading a CSV file for which the headers are not properly labeled (proper labels: source,destination,language,status_code), warning messages and these messages are quite cryptic and too technical for normal site admin users to understand.

Warnings/Error Message:
Warning: Undefined array key "source" in Drupal\path_redirect_import\Form\MigrateRedirectForm->validateForm() (line 176 of modules/contrib/path_redirect_import/src/Form/MigrateRedirectForm.php).

Steps to reproduce

Upload a CSV file whose headers are labeled the following: Source,Destination,Language,Status_Code

Proposed resolution

Add a few conditions to handle Undefined array keys.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇵🇭Philippines meralvingrita24 Cabuyao City, Laguna

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

Comments & Activities

Production build 0.71.5 2024