Invoice Logo - The "file_validate_extensions" plugin does not exist.

Created on 12 May 2025, about 15 hours ago

Bug: Commerce Invoice logo upload fails with PluginNotFoundException: The "file_validate_extensions" plugin does not exist.

Environment

  • Drupal 11
  • Commerce Invoice module

Root Cause

Drupal’s Form API now treats each upload‐validator key as a validation plugin ID. The legacy procedural callback file_validate_extensions() no longer exists, so the plugin manager cannot locate it.

Suggested Resolution

In InvoiceTypeForm.php, replace the old callback key with the FileExtension plugin:

- '#upload_validators' => [
-   'file_validate_extensions' => ['png jpg svg'],
- ],
+ '#upload_validators' => [
+   'FileExtension' => ['png jpg svg'],
+ ],
🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇦🇺Australia dougiep

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