Entity Browser - Widget Section Plugin Settings

Created on 1 February 2024, 5 months ago
Updated 6 February 2024, 5 months ago

Problem/Motivation

I want to be able to select Brandfolder Images from an Entity Browser view. I have created a Brandfolder Entity Browser and an Entity Browser view for Brandfolder images. See attached. When I select a Brandfolder Image in my content type, I get the following error:

The website encountered an unexpected error. Please try again later.

TypeError: brandfolder_map_media_entity_to_attachment(): Argument #1 ($media_entity_id) must be of type int, Drupal\media\Entity\Media given in brandfolder_map_media_entity_to_attachment() (line 1395 of modules/contrib/brandfolder/brandfolder.module).
array_walk(Array, 'brandfolder_map_media_entity_to_attachment') (Line: 156)
Drupal\brandfolder\Plugin\EntityBrowser\Widget\BrandfolderBrowser->getForm(Array, Object, Array) (Line: 177)
Drupal\entity_browser\Form\EntityBrowserForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('entity_browser_brandfolder_hero_entity_browser_form', Object) (Line: 375)
Drupal\Core\Form\FormBuilder->rebuildForm('entity_browser_brandfolder_hero_entity_browser_form', Object, Array) (Line: 633)
Drupal\Core\Form\FormBuilder->processForm('entity_browser_brandfolder_hero_entity_browser_form', Array, Object) (Line: 325)
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: 592)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 44)
Drupal\redirect_after_login\RedirectMiddleware->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: 53)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 124)
Drupal\cloudflare\CloudFlareMiddleware->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: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Additional info:
- Brandfolder Image selection works as expected when I configure the Widget Section Plugin Settings > Selection Display Plugin = No selection display.
Brandfolder Image selection does nothing when I configure the Widget Section Plugin Settings > Selection Display Plugin = Multi-step selection display.

πŸ› Bug report
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sassafrass

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

Comments & Activities

  • Issue created by @sassafrass
  • πŸ‡ΊπŸ‡ΈUnited States ndewhurst USA

    Thanks for documenting. The Brandfolder Browser plugin for the Entity Browser module is a newer addition, and needs to be expanded to support more of the Entity Browser configuration options and use cases.

Production build 0.69.0 2024