The "file_validate_extensions" Plugin Has Been Deprecated in 10.2.x

Created on 16 October 2024, 6 months ago

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.

🐛 Bug report
Status

Active

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @lfersoy
  • Pipeline finished with Success
    6 months ago
    Total: 205s
    #311722
  • 🇨🇦Canada joseph.olstad

    We need this! Reviewing

  • Status changed to Needs review 28 days ago
  • 🇨🇦Canada joseph.olstad

    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!

Production build 0.71.5 2024