Retrieving formatter class results in error

Created on 15 March 2022, almost 3 years ago
Updated 19 September 2024, 6 months ago

Problem/Motivation

Implementation or connection to an custom remote repository of media. May a hint to fix or patch could be helpful.
Drupal 9.3.7
PHP 8.0.8

Steps to reproduce

LogicException: The Remote Media validator needs the _default_ media display to be configured, and for the source field to use any of the formatters provided by the Media Remote module. in Drupal\media_remote\Plugin\media\Source\MediaRemoteSource->getFormatterClass() (line 84 of modules/contrib/media_remote/src/Plugin/media/Source/MediaRemoteSource.php).

Drupal\media_remote\Plugin\Validation\Constraint\MediaRemoteConstraintValidator->validate(Object, Object) (Line: 196)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints(Object, '000000000c938a71000000007b9bfd41', Array) (Line: 148)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object) (Line: 158)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 100)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object) (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 489)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 415)
Drupal\media\Entity\Media->validate() (Line: 188)
Drupal\Core\Entity\ContentEntityForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'media_test_add_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('media_test_add_form', Array, Object) (Line: 588)
Drupal\Core\Form\FormBuilder->processForm('media_test_add_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
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: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
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: 50)
Drupal\ban\BanMiddleware->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: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

๐Ÿ’ฌ Support request
Status

Fixed

Version

1.2

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany KLIGGS Mรผnchen

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland merilainen

    This is still happening. I don't think saving content should rely on display formatting settings and definitely not block saving content.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain marcoscano Barcelona, Spain

    I agree that the module could handle the misconfiguration in a more graceful way. Merge Requests are welcome if anyone feels like working on it.

Production build 0.71.5 2024