Problem/Motivation

After updating to the 1.4.0-rc1 branch, the replacement feature returns the following error:
"The 'file_validate_extensions' plugin does not exist."
Please refer to the following change record for more details.

Proposed resolution

Since the module still supports earlier Drupal versions, I propose checking the current site version and applying the appropriate #upload_validators based on it.

Command icon 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

lfersoy created an issue. See original summary.

joseph.olstad’s picture

Status: Active » Needs review

We need this! Reviewing

joseph.olstad’s picture

Priority: Normal » Critical
joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

This actually fixes our problem in D11

D11 also needs this fix.

Without this fix we get a nasty error.

BEFORE:

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "file_validate_extensions" plugin does not exist. Valid plugin IDs for Drupal\Core\Validation\ConstraintManager are: Callback, Blank, NotBlank, Email, Choice, Image, BlockContentEntityChanged, SourceEditingPreventSelfXssConstraint, CKEditor5Element, CKEditor5FundamentalCompatibility, CKEditor5EnabledConfigurablePlugins, CKEditor5ToolbarItemDependencyConstraint, UniqueLabelInList, CKEditor5ToolbarItemConditionsMet, CKEditor5ToolbarItem, StyleSensibleElement, CKEditor5MediaAndFilterSettingsInSync, SourceEditingRedundantTags, CommentName, ModerationState, CropTypeAspectRatioValidation, CropTypeMachineNameValidation, DateTimeFormat, EntityBrowserImageDimensions, QueueSize, FileSizeLimit, FileIsImage, FileExtensionSecure, FileExtension, FileNameLength, FileEncoding, FileImageDimensions, FileUriUnique, FileValidation, FileHashDedupe, LinkExternalProtocols, LinkAccess, LinkNotExistingInternal, LinkType, oembed_resource, MediaMappingsConstraint, ItemsCount, MenuSettings, PathAlias, RedirectSourceLinkType, SharedEmailUnique, TaxonomyHierarchy, Telephone, UserMailRequired, UserName, ProtectedUserField, UserNameUnique, UserCancelMethod, UserMailUnique, VideoEmbedValidation, InstagramEmbedCode, TweetEmbedCode, MenuTreeHierarchy, ContentTranslationSynchronizedFields, Count, UriHost, UniqueField, EntityBundleExists, ValidKeys, Range, CountryCode, Uuid, NotNull, AllowedValues, ComplexData, Length, Regex, Null, PrimitiveType, FullyValidatable, ConfigExists, LangcodeRequiredIfTranslatableValues, RequiredConfigDependencies, ExtensionName, ExtensionExists, PluginExists, UniquePathAlias, ValidPath, EntityUntranslatableFields, ReferenceAccess, EntityType, EntityChanged, EntityHasField, ValidReference, Bundle, ImmutableProperties in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

AFTER:

No error!

simhag’s picture

I can also confirm that the provided code update fixes the error (Drupal 11). Many thanks for the MR!

  • timohuisman committed faa11fc6 on 8.x-1.x authored by lfersoy
    Issue #3481223: Updated file upload validators to support Drupal...

timohuisman credited casey.

timohuisman’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution! I've merged the MR and will tag a new release later today.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.