Problem/Motivation
When adding an icon to the paragraph, the folowing error occurs and blocks the upload:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "file_validate_extensions" plugin does not exist. Valid plugin IDs for Drupal\Core\Validation\ConstraintManager are: ...
Steps to reproduce
Install a module on the core 11.1, create a paragraph type and try to upload an image to the Paragraph icon field
Proposed resolution
The function is deprecated in Drupal 11: https://api.drupal.org/api/drupal/core%21modules%21file%21file.module/fu...
Need to use the 'file.validator' service instead https://www.drupal.org/node/3363700
Patch that fixes the deprecation error is attached.
| Comment | File | Size | Author |
|---|
Issue fork paragraphs_browser-3496155
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
yevko commentedComment #5
trishen commentedI checked patch and created an MR with standards support.
Comment #7
gueguerreiroUpdated the MR to fix the file validation to the correct format. As per https://www.drupal.org/node/3363700, we need an "extensions" as the array key.
So we need to change from:
to:
The previous change fixes the error, but wasn't actually validating anything anymore.
Comment #8
borisson_Since the previous function was removed in drupal 11 we need to fix this, rtbc++
Comment #9
damienmckennaThe patch is no longer appropriate, the MR is the correct approach.