use Drupal\file\FileInterface repeated in FileRemoteUrl.php

Created on 6 December 2024, 30 days ago

Problem/Motivation

When running a migration for new files via 'drush migrate:import document', the import does not complete and I receive an error:

PHP Fatal error: Cannot use Drupal\file\FileInterface as FileInterface because the name is already in use in /var/www/usccr.gov/html/modules/contrib/migrate_file/src/Plugin/migrate/process/FileRemoteUrl.php on line 10

I also tried to execute it via the web interface and was not successful there either, as I received an "AJAX HTTP error".

Steps to reproduce

  1. Update an existing/previous CSV file with new rows
  2. Execute import via drush or web interface

Proposed resolution

"use Drupal\file\FileInterface;" appears twice in FileRemoteUrl.php

Remove the duplicate - line 5 or line 10

I did this on my end and the import worked. (Sorry, I'm not comfortable doing an issue fork yet)

Remaining tasks

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fkildoo Alexandria, VA

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

Comments & Activities

Production build 0.71.5 2024