I am getting this error every so often even after clearing cache:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "media.bundle_add" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 187 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Backtrace:

Drupal\Core\Routing\UrlGenerator->getRoute('media.bundle_add') (Line: 277)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('media.bundle_add', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('media.bundle_add', Array, Array, ) (Line: 735)
Drupal\Core\Url->toString() (Line: 113)
Drupal\media_entity_image\Plugin\EntityBrowser\Widget\Upload->buildConfigurationForm(Array, Object) (Line: 120)
Drupal\entity_browser\Form\WidgetsConfig->buildForm(Array, Object) (Line: 261)
Drupal\ctools\Wizard\FormWizardBase->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('entity_browser_widgets_config_form', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 45)
Drupal\ctools\Wizard\WizardFactory->getWizardForm(Object, Array, ) (Line: 84)
Drupal\ctools\Controller\WizardFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

All I want to do is have the image field use the media browser widget like from Drupal 7. What is the easiest way to do this? I tried to set it up, but keep running into errors. The one time I saw the upload modal, the image that I provided it threw an error: "The entity must be of type: file".

Comments

kevinquillen created an issue. See original summary.

slashrsm’s picture

Status: Active » Closed (duplicate)
Issue tags: +D8Media

This sounds like a duplicate of #2831071: Dynamically define menu links.

Eric Imthorn’s picture

Don't forget to add a media bundle in Structure > Media bundles ( /admin/structure/media )