Hi there. Unfortunately, I'm experiencing all kinds of issues with Entity Browser. The Drupal log shows me this message over and over again.

Location http://example.org/admin/config/content/entity_browser/browse_images/wid...
Message Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media_bundle" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 133 of /home/user/drupal8/core/lib/Drupal/Core/Entity/EntityTypeManager.php).

I'm running Drupal 8.2.1 with:

  • Entity Browser 8.x-1.0-alpha9
  • Entity Embed 8.x-1.0-beta2
  • File Entity Browser 8.x-1.0-alpha1

In the past, some media related modules may have been installed/deinstalled, but I don't know if that's relevant. Please let me know if you require more details.

If anyone could point me in the right direction, I'd be grateful.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

P44T created an issue. See original summary.

P44T’s picture

Issue summary: View changes
Rajab Natshah’s picture

I'm having this issue too.
We do need to have Media types first.

slashrsm’s picture

Category: Bug report » Support request
Issue tags: +D8Media

Please check if you have media_entity module enabled.

P44T’s picture

Please check if you have media_entity module enabled.

Currently, I don't have it installed or enabled. Would I have to install it? I can't find it as a dependency of Entity Browser in the documentation...

I don't need the entire media stack, as it is an overkill for my situation. I was just using File Entity Browser to embed images into node content. This project has Entity Browser and Entity Embed as dependencies and suits my requirements just fine.

slashrsm’s picture

Currently, I don't have it installed or enabled. Would I have to install it? I can't find it as a dependency of Entity Browser in the documentation...

No it is not, but you must have installed/used something that needs it and doesn't provide dependencies. Which modules are you using along the Entity browser?

P44T’s picture

Here is the list of enabled modules:

$ drush pm-list | grep Enabled
 Advanced CSS/JS Aggregation      AdvAgg Minify CSS (advagg_css_minify)                      Module  Enabled        8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg Minify JavaScript (advagg_js_minify)                Module  Enabled        8.x-2.0-rc2
 Advanced CSS/JS Aggregation      Advanced CSS/JS Aggregation (advagg)                       Module  Enabled        8.x-2.0-rc2
 Chaos tool suite                 Chaos tools (ctools)                                       Module  Enabled        8.x-3.0-alpha27
 Core                             Actions (action)                                           Module  Enabled        8.2.1
 Core                             Automated Cron (automated_cron)                            Module  Enabled        8.2.1
 Core                             Block (block)                                              Module  Enabled        8.2.1
 Core                             Breakpoint (breakpoint)                                    Module  Enabled        8.2.1
 Core                             CKEditor (ckeditor)                                        Module  Enabled        8.2.1
 Core                             Configuration Manager (config)                             Module  Enabled        8.2.1
 Core                             Contact (contact)                                          Module  Enabled        8.2.1
 Core                             Contextual Links (contextual)                              Module  Enabled        8.2.1
 Core                             Custom Block (block_content)                               Module  Enabled        8.2.1
 Core                             Custom Menu Links (menu_link_content)                      Module  Enabled        8.2.1
 Core                             Database Logging (dblog)                                   Module  Enabled        8.2.1
 Core                             Field (field)                                              Module  Enabled        8.2.1
 Core                             Field UI (field_ui)                                        Module  Enabled        8.2.1
 Core                             Filter (filter)                                            Module  Enabled        8.2.1
 Core                             Help (help)                                                Module  Enabled        8.2.1
 Core                             History (history)                                          Module  Enabled        8.2.1
 Core                             Internal Dynamic Page Cache (dynamic_page_cache)           Module  Enabled        8.2.1
 Core                             Internal Page Cache (page_cache)                           Module  Enabled        8.2.1
 Core                             Menu UI (menu_ui)                                          Module  Enabled        8.2.1
 Core                             Node (node)                                                Module  Enabled        8.2.1
 Core                             Path (path)                                                Module  Enabled        8.2.1
 Core                             RDF (rdf)                                                  Module  Enabled        8.2.1
 Core                             Search (search)                                            Module  Enabled        8.2.1
 Core                             Shortcut (shortcut)                                        Module  Enabled        8.2.1
 Core                             System (system)                                            Module  Enabled        8.2.1
 Core                             Taxonomy (taxonomy)                                        Module  Enabled        8.2.1
 Core                             Text Editor (editor)                                       Module  Enabled        8.2.1
 Core                             Toolbar (toolbar)                                          Module  Enabled        8.2.1
 Core                             Tour (tour)                                                Module  Enabled        8.2.1
 Core                             Update Manager (update)                                    Module  Enabled        8.2.1
 Core                             User (user)                                                Module  Enabled        8.2.1
 Core                             Views (views)                                              Module  Enabled        8.2.1
 Core                             Views UI (views_ui)                                        Module  Enabled        8.2.1
 Custom                           Linkit (linkit)                                            Module  Enabled        8.x-4.1
 Field types                      Datetime (datetime)                                        Module  Enabled        8.2.1
 Field types                      File (file)                                                Module  Enabled        8.2.1
 Field types                      Image (image)                                              Module  Enabled        8.2.1
 Field types                      Link (link)                                                Module  Enabled        8.2.1
 Field types                      Options (options)                                          Module  Enabled        8.2.1
 Field types                      Text (text)                                                Module  Enabled        8.2.1
 Filters                          Entity Embed (entity_embed)                                Module  Enabled        8.x-1.0-beta2
 Media                            Crop API (crop)                                            Module  Enabled        8.x-1.0
 Media                            dropzonejs (dropzonejs)                                    Module  Enabled        8.x-1.0-alpha2
 Media                            DropzoneJS entity browser widget (dropzonejs_eb_widget)    Module  Enabled        8.x-1.0-alpha2
 Media                            Entity Browser (entity_browser)                            Module  Enabled        8.x-1.0-alpha9
 Media                            ImageWidgetCrop (image_widget_crop)                        Module  Enabled        8.x-1.3
 Media                            Juicebox (juicebox)                                        Module  Enabled        8.x-2.0-beta3
 Multilingual                     Interface Translation (locale)                             Module  Enabled        8.2.1
 Multilingual                     Language (language)                                        Module  Enabled        8.2.1
 Other                            Embed (embed)                                              Module  Enabled        8.x-1.0-rc3
 Other                            File Browser (file_browser)                                Module  Enabled        8.x-1.0-alpha1
 Other                            Libraries (libraries)                                      Module  Enabled        8.x-3.x-dev
 Other                            Menu Block (menu_block)                                    Module  Enabled        8.x-1.4
 Other                            Pathauto (pathauto)                                        Module  Enabled        8.x-1.0-beta1
 Other                            Scheduler (scheduler)                                      Module  Enabled        8.x-1.0-alpha2
 Other                            Token (token)                                              Module  Enabled        8.x-1.0-beta2
 SEO                              Metatag (metatag)                                          Module  Enabled        8.x-1.0-beta10
 SEO                              Metatag: Open Graph (metatag_open_graph)                   Module  Enabled        8.x-1.0-beta10
 Statistics                       Google Analytics (google_analytics)                        Module  Enabled        8.x-2.1
 Bootstrap                        Bootstrap (bootstrap)                                      Theme   Enabled        8.x-3.0-rc2
 Core                             Seven (seven)                                              Theme   Enabled        8.2.1

List of all modules:

$ drush pm-list
 Package                          Name                                                       Type    Status         Version
 Advanced CSS/JS Aggregation      AdvAgg Bundler (advagg_bundler)                            Module  Not installed  8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg CDN (advagg_cdn)                                    Module  Not installed  8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg CSS/JS Validator (advagg_validator)                 Module  Not installed  8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg External Minification (advagg_ext_minify)           Module  Not installed  8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg Minify CSS (advagg_css_minify)                      Module  Enabled        8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg Minify JavaScript (advagg_js_minify)                Module  Enabled        8.x-2.0-rc2
 Advanced CSS/JS Aggregation      AdvAgg Modifier (advagg_mod)                               Module  Not installed  8.x-2.0-rc2
 Advanced CSS/JS Aggregation      Advanced CSS/JS Aggregation (advagg)                       Module  Enabled        8.x-2.0-rc2
 Chaos tool suite                 Chaos tools (ctools)                                       Module  Enabled        8.x-3.0-alpha27
 Chaos tool suite                 Chaos tools Views (ctools_views)                           Module  Not installed  8.x-3.0-alpha27
 Chaos tool suite (Experimental)  Chaos tools blocks (ctools_block)                          Module  Not installed  8.x-3.0-alpha27
 Core                             Actions (action)                                           Module  Enabled        8.2.1
 Core                             Activity Tracker (tracker)                                 Module  Not installed  8.2.1
 Core                             Aggregator (aggregator)                                    Module  Not installed  8.2.1
 Core                             Automated Cron (automated_cron)                            Module  Enabled        8.2.1
 Core                             Ban (ban)                                                  Module  Not installed  8.2.1
 Core                             Block (block)                                              Module  Enabled        8.2.1
 Core                             Book (book)                                                Module  Not installed  8.2.1
 Core                             Breakpoint (breakpoint)                                    Module  Enabled        8.2.1
 Core                             CKEditor (ckeditor)                                        Module  Enabled        8.2.1
 Core                             Color (color)                                              Module  Not installed  8.2.1
 Core                             Comment (comment)                                          Module  Not installed  8.2.1
 Core                             Configuration Manager (config)                             Module  Enabled        8.2.1
 Core                             Contact (contact)                                          Module  Enabled        8.2.1
 Core                             Contextual Links (contextual)                              Module  Enabled        8.2.1
 Core                             Custom Block (block_content)                               Module  Enabled        8.2.1
 Core                             Custom Menu Links (menu_link_content)                      Module  Enabled        8.2.1
 Core                             Database Logging (dblog)                                   Module  Enabled        8.2.1
 Core                             Field (field)                                              Module  Enabled        8.2.1
 Core                             Field UI (field_ui)                                        Module  Enabled        8.2.1
 Core                             Filter (filter)                                            Module  Enabled        8.2.1
 Core                             Forum (forum)                                              Module  Not installed  8.2.1
 Core                             Help (help)                                                Module  Enabled        8.2.1
 Core                             History (history)                                          Module  Enabled        8.2.1
 Core                             Internal Dynamic Page Cache (dynamic_page_cache)           Module  Enabled        8.2.1
 Core                             Internal Page Cache (page_cache)                           Module  Enabled        8.2.1
 Core                             Menu UI (menu_ui)                                          Module  Enabled        8.2.1
 Core                             Node (node)                                                Module  Enabled        8.2.1
 Core                             Path (path)                                                Module  Enabled        8.2.1
 Core                             Quick Edit (quickedit)                                     Module  Not installed  8.2.1
 Core                             RDF (rdf)                                                  Module  Enabled        8.2.1
 Core                             Responsive Image (responsive_image)                        Module  Not installed  8.2.1
 Core                             Search (search)                                            Module  Enabled        8.2.1
 Core                             Shortcut (shortcut)                                        Module  Enabled        8.2.1
 Core                             Statistics (statistics)                                    Module  Not installed  8.2.1
 Core                             Syslog (syslog)                                            Module  Not installed  8.2.1
 Core                             System (system)                                            Module  Enabled        8.2.1
 Core                             Taxonomy (taxonomy)                                        Module  Enabled        8.2.1
 Core                             Testing (simpletest)                                       Module  Not installed  8.2.1
 Core                             Text Editor (editor)                                       Module  Enabled        8.2.1
 Core                             Toolbar (toolbar)                                          Module  Enabled        8.2.1
 Core                             Tour (tour)                                                Module  Enabled        8.2.1
 Core                             Update Manager (update)                                    Module  Enabled        8.2.1
 Core                             User (user)                                                Module  Enabled        8.2.1
 Core                             Views (views)                                              Module  Enabled        8.2.1
 Core                             Views UI (views_ui)                                        Module  Enabled        8.2.1
 Core (Experimental)              BigPipe (big_pipe)                                         Module  Not installed  8.2.1
 Core (Experimental)              Content Moderation (content_moderation)                    Module  Not installed  8.2.1
 Core (Experimental)              Datetime Range (datetime_range)                            Module  Not installed  8.2.1
 Core (Experimental)              Inline Form Errors (inline_form_errors)                    Module  Not installed  8.2.1
 Core (Experimental)              Migrate (migrate)                                          Module  Not installed  8.2.1
 Core (Experimental)              Migrate Drupal (migrate_drupal)                            Module  Not installed  8.2.1
 Core (Experimental)              Migrate Drupal UI (migrate_drupal_ui)                      Module  Not installed  8.2.1
 Core (Experimental)              Place Blocks (block_place)                                 Module  Not installed  8.2.1
 Core (Experimental)              Settings Tray (outside_in)                                 Module  Not installed  8.2.1
 Custom                           Linkit (linkit)                                            Module  Enabled        8.x-4.1
 Development                      Devel (devel)                                              Module  Not installed  8.x-1.0-alpha1
 Development                      Devel generate (devel_generate)                            Module  Not installed  8.x-1.0-alpha1
 Development                      Devel Kint (kint)                                          Module  Not installed  8.x-1.0-alpha1
 Development                      Devel Node Access (devel_node_access)                      Module  Not installed  8.x-1.0-alpha1
 Development                      Web Profiler (webprofiler)                                 Module  Not installed  8.x-1.0-alpha1
 Field types                      Datetime (datetime)                                        Module  Enabled        8.2.1
 Field types                      File (file)                                                Module  Enabled        8.2.1
 Field types                      Image (image)                                              Module  Enabled        8.2.1
 Field types                      Link (link)                                                Module  Enabled        8.2.1
 Field types                      Options (options)                                          Module  Enabled        8.2.1
 Field types                      Telephone (telephone)                                      Module  Not installed  8.2.1
 Field types                      Text (text)                                                Module  Enabled        8.2.1
 Filters                          Entity Embed (entity_embed)                                Module  Enabled        8.x-1.0-beta2
 Media                            Crop API (crop)                                            Module  Enabled        8.x-1.0
 Media                            dropzonejs (dropzonejs)                                    Module  Enabled        8.x-1.0-alpha2
 Media                            DropzoneJS entity browser widget (dropzonejs_eb_widget)    Module  Enabled        8.x-1.0-alpha2
 Media                            Entity Browser (entity_browser)                            Module  Enabled        8.x-1.0-alpha9
 Media                            Entity Browser example (entity_browser_example)            Module  Not installed  8.x-1.0-alpha9
 Media                            Entity Browser IEF (entity_browser_entity_form)            Module  Not installed  8.x-1.0-alpha9
 Media                            ImageWidgetCrop (image_widget_crop)                        Module  Enabled        8.x-1.3
 Media                            ImageWidgetCrop examples (image_widget_crop_examples)      Module  Not installed  8.x-1.3
 Media                            Juicebox (juicebox)                                        Module  Enabled        8.x-2.0-beta3
 Media                            Media entity crop (crop_media_entity)                      Module  Not installed  8.x-1.0
 Multilingual                     Configuration Translation (config_translation)             Module  Not installed  8.2.1
 Multilingual                     Content Translation (content_translation)                  Module  Not installed  8.2.1
 Multilingual                     Interface Translation (locale)                             Module  Enabled        8.2.1
 Multilingual                     Language (language)                                        Module  Enabled        8.2.1
 Other                            Embed (embed)                                              Module  Enabled        8.x-1.0-rc3
 Other                            Entity (entity)                                            Module  Not installed  8.x-1.0-alpha3
 Other                            File Browser (file_browser)                                Module  Enabled        8.x-1.0-alpha1
 Other                            File Browser Example (file_browser_example)                Module  Not installed  8.x-1.0-alpha1
 Other                            Libraries (libraries)                                      Module  Enabled        8.x-3.x-dev
 Other                            Menu Block (menu_block)                                    Module  Enabled        8.x-1.4
 Other                            Pathauto (pathauto)                                        Module  Enabled        8.x-1.0-beta1
 Other                            Scheduler (scheduler)                                      Module  Enabled        8.x-1.0-alpha2
 Other                            Scheduler Rules Integration (scheduler_rules_integration)  Module  Not installed  8.x-1.0-alpha2
 Other                            Token (token)                                              Module  Enabled        8.x-1.0-beta2
 SEO                              Metatag (metatag)                                          Module  Enabled        8.x-1.0-beta10
 SEO                              Metatag: Google Plus (metatag_google_plus)                 Module  Not installed  8.x-1.0-beta10
 SEO                              Metatag: Open Graph (metatag_open_graph)                   Module  Enabled        8.x-1.0-beta10
 SEO                              Metatag: Twitter Cards (metatag_twitter_cards)             Module  Not installed  8.x-1.0-beta10
 SEO                              Metatag: Verification (metatag_verification)               Module  Not installed  8.x-1.0-beta10
 Statistics                       Google Analytics (google_analytics)                        Module  Enabled        8.x-2.1
 Web services                     HAL (hal)                                                  Module  Not installed  8.2.1
 Web services                     HTTP Basic Authentication (basic_auth)                     Module  Not installed  8.2.1
 Web services                     RESTful Web Services (rest)                                Module  Not installed  8.2.1
 Web services                     Serialization (serialization)                              Module  Not installed  8.2.1
 Bootstrap                        Bootstrap (bootstrap)                                      Theme   Enabled        8.x-3.0-rc2
 Core                             Bartik (bartik)                                            Theme   Disabled       8.2.1
 Core                             Seven (seven)                                              Theme   Enabled        8.2.1
 Core                             Stark (stark)                                              Theme   Disabled       8.2.1
slashrsm’s picture

Could be DropzoneJs. That module provides two entity browser widgets; one that works with files and one that works with media entities. Make sure that you use the first one.

P44T’s picture

Could be DropzoneJs. That module provides two entity browser widgets; one that works with files and one that works with media entities. Make sure that you use the first one.

Perhaps this has been the case, although I'm fairly sure I would not select 'Media Entity DropzoneJS', just because I know I'm not using Media Entity.

Anyway, I found when the issue occurs in my environment. It happens when I go to the 'Widgets' page when editing a certain entity browser I configured earlier on. I extracted the configuration of the faulty entity browser from the config table in the database:

a:13:{s:4:"uuid";s:36:"04da9c8a-311b-44f1-8308-05e14fbe288b";s:8:"langcode";s:2:"nl";s:6:"status";b:1;s:12:"dependencies";a:1:{s:6:"module";a:1:{i:0;s:20:"dropzonejs_eb_widget";}}s:4:"name";s:13:"browse_images";s:5:"label";s:13:"browse_images";s:7:"display";s:10:"standalone";s:21:"display_configuration";a:1:{s:4:"path";s:21:"/browser/afbeeldingen";}s:17:"selection_display";s:10:"no_display";s:31:"selection_display_configuration";a:0:{}s:15:"widget_selector";s:4:"tabs";s:29:"widget_selector_configuration";a:0:{}s:7:"widgets";a:1:{s:36:"1a9c11c9-268e-4ef9-bbf9-9d2a59f68617";a:5:{s:8:"settings";a:5:{s:15:"upload_location";s:40:"public://[date:custom:Y]-[date:custom:m]";s:20:"dropzone_description";s:30:"Drop files here to upload them";s:12:"max_filesize";s:2:"2M";s:10:"extensions";s:52:"jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp";s:11:"submit_text";s:15:"Select entities";}s:4:"uuid";s:36:"1a9c11c9-268e-4ef9-bbf9-9d2a59f68617";s:6:"weight";i:1;s:5:"label";s:10:"dropzonejs";s:2:"id";s:10:"dropzonejs";}}}

Does this show anything, or would I need to provide additional information?

slashrsm’s picture

Project: Entity Browser » DropzoneJS
Version: 8.x-1.0-alpha9 » 8.x-1.x-dev
Component: Core API » Code

It could be that the Media entity widget that Dropzone provides causes this when Media entity is not enabled. There are some dependency problem that we experienced in the past in this area. Could be related to that.

marcoscano’s picture

I can reproduce a related bug (not sure if it is exactly what happens to you though, but it can be the same :)

Steps to reproduce on a clean install:
- Enable the modules DropzoneJS, DropzoneJS Entity Browser, Entity Browser and Ctools
- Go to /admin/config/content/entity_browser/add and create an EB, select anything for the 4 first steps
- On the last step (Widgets), select "DropzoneJS", which will work fine, and then select "Media Entity DropzoneJS". At this point nothing happens, and you may think "ok, this is not available, let's leave then only the first one".
- Save the form.
- WSOD, with the same message on the log:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "media_bundle" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 125 of /var/www/d8media0/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Some information from the non-available plugin is indeed saved into the entity_browser, because it is completely broken trough the UI, if I try to edit the widgets again I always get the WSOD, the only solution is to delete the browser and recreate a new one.

Perhaps this could be solved in a more generic way if the plugins declare their dependencies somehow, and in Entity Browser, instead of adding all of them:

// ... /entity_browser/src/Form/WidgetsConfig.php, line 55:

    $widgets = [];
    foreach ($this->widgetManager->getDefinitions() as $plugin_id => $plugin_definition) {
      $widgets[$plugin_id] = $plugin_definition['label'];
    }

we would add only the ones with dependencies satisfied?

Primsi’s picture

Status: Active » Needs work

This is relevant then: #2769771: Split Media Entity specific widget off the "DropzoneJS entity browser widget" sub module

I am still not sure if that's the correct approach. The alternative could probably some kind of soft dependency, ie: check if medi_entity exists where relevant and return some kind of notification about the missing dependency.

P44T’s picture

marcoscano, thank you for the clear explanation. I think the situation you describe is very likely to have happened to me.

peter.keppert’s picture

Please note that this error message may also appear in case described in #2897255: Support Media core module (Drupal core 8.4.x-dev). The same error manifests itself, but causes are different.

rsavage’s picture

I just hit this issue, how exactly can I resolve it?

Primsi’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Category: Support request » Bug report
Status: Needs work » Needs review
FileSize
1.66 KB

Let's try a Berdir's suggestion. Also moving to 8.x-2.x and make this a bug.

lias’s picture

Is this similar error issue, re "media_bundle should be media_type?"

Media video entity: https://www.drupal.org/project/media_entity_video/issues/2930974

heddn’s picture

Status: Needs review » Needs work

I still get Drupal/Component/Plugin/Exception/PluginNotFoundException with message 'The "dropzonejs_media_entity" plugin does not exist.' after applying this patch.

sharif.elshobkshy’s picture

FileSize
2.08 KB

Hi,

I tried patch #16 and did not work.

I don't know if this is the best way to solve the issue, but it got me out of the hole.
Basically it gives you the chance to access the "Widgets" page and delete the Plugin that causes the fatal issue (in my case, "Media Entity DropzoneJS").

Ideally we should prevent the option from showing up on the UI under certain circumstances (but I'm not sure which ones they are).

sharif.elshobkshy’s picture

FileSize
2.13 KB

Patch updated for dropzonejs 2.3