Fatal error with any Drush command

Created on 20 October 2023, about 1 year ago
Updated 27 October 2023, about 1 year ago

Run any Drush command results in:

PHP Fatal error: Cannot use Drupal\Component\Utility\Html as Html because the name is already in use in /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/web/modules/contrib/file_download/modules/file_download_counter/file_download_counter.module on line 11

Drupal 10.1.5
PHP 8.1.18

πŸ› Bug report
Status

Active

Version

1.6

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom webfaqtory

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

Comments & Activities

  • Issue created by @webfaqtory
  • πŸ‡¬πŸ‡§United Kingdom webfaqtory
  • πŸ‡ΊπŸ‡ΈUnited States shelane

    I have the file_download and file_download_counter modules enabled on Drupal 10.1.5 and PHP 8.1.14. I have run several drush commands without any errors reported. What commands are you running that you're encountering this?

  • πŸ‡¬πŸ‡§United Kingdom webfaqtory

    Just upgraded again from 1.5 to 1.6 and it's worse than just Drush. The site fails to load with a 500 error. In the apache error log there is the same error.

    Previously I hadn't even tried the site due to the error from a drush cr

    In the .theme file there is use Drupal\Component\Utility\Html;

    I suggest you add this to your .theme file to get the error

Production build 0.71.5 2024