PHP exception when visiting update-form

Created on 2 September 2024, 7 months ago

When visiting the update-form (/admin/content/files/update-form), raises a PHP exception

When visiting the update-form (/admin/content/files/update-form), raises Uncaught PHP Exception TypeError: "Cannot assign Drupal\\Core\\File\\FileUrlGenerator to property Drupal\\file_update\\FileUpdateService::$fileUrlGenerator of type Drupal\\file\\FileRepositoryInterface" at /modules/contrib/file_update/src/FileUpdateService.php line 183.

Steps to reproduce

Install the module and visit /admin/content/files/update-form

🐛 Bug report
Status

Needs review

Version

1.1

Component

Code

Created by

🇦🇷Argentina fpap

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

Merge Requests

Comments & Activities

  • Issue created by @fpap
  • Assigned to fpap
  • 🇦🇷Argentina fpap

    I have found the error, at /modules/contrib/file_update/src/FileUpdateService.php line 105, definition of property Drupal\\file_update\\FileUpdateService::$fileUrlGenerator. There, the type of the property is wrong: it is FileRepositoryInterface when it should be FileUrlGeneratorInterface.

    Proposed resolution

    At /modules/contrib/file_update/src/FileUpdateService.php line 105 replace the type FileRepositoryInterface with FileUrlGeneratorInterface.

  • Merge request !41.1.x → (Open) created by fpap
  • Status changed to Needs review 7 months ago
Production build 0.71.5 2024