Module errors when trying to guess the mime type of the file in D10

Created on 21 August 2023, over 1 year ago
Updated 26 February 2024, 10 months ago

Problem/Motivation

Module errors when trying to guess the mime type of the file in D10, due to a change in the ExtensionMimeTypeGuesser class in Drupal core.

Error: Call to undefined method Drupal\Core\ProxyClass\File\MimeType\ExtensionMimeTypeGuesser::guess() in Drupal\webform_confirmation_file\Plugin\WebformHandler\ConfirmationFileWebformHandler->getMimeType() (line 179 of modules/contrib/webform_confirmation_file/src/Plugin/WebformHandler/ConfirmationFileWebformHandler.php).

Drupal\webform_confirmation_file\Plugin\WebformHandler\ConfirmationFileWebformHandler->confirmForm(Array, Object, Object) (Line: 2765)
Drupal\webform\Entity\Webform->invokeHandlers('confirmForm', Array, Object, Object) (Line: 1926)
Drupal\webform\WebformSubmissionForm->confirmForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_ai_whitepaper_form_add_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'add') (Line: 1257)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 77)
Drupal\webform\Controller\WebformEntityController->addForm(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 692)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Submit a form with a confirm file in a D10 site.

๐Ÿ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain jsbalsera Cรณrdoba, Spain

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

Comments & Activities

Production build 0.71.5 2024