Closed (duplicate)
Project:
Entity Browser
Version:
8.x-1.x-dev
Component:
Core API
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 May 2016 at 17:46 UTC
Updated:
17 Jun 2016 at 10:45 UTC
Jump to comment: Most recent
Comments
Comment #2
slashrsm commentedYou need to create at least one view with the "Entity browser" display on it. You also need to make sure that the view includes "Entity browser bulk select form" field. It should appear in the entity browser configuration form when you do that.
Please check that and get back. I am aware that we lack documentation here. It would be great to have some kind of guideline on the widget configuration form. Any contributions in that direction are very welcome.
Thank you for evaluating Entity browser.
Comment #3
albertski commentedFor some reason I was able to see the drop down in the Widget form to let me select the form. Not sure if it had something to do with me just setting it in the configuration and then going back to the form.
Comment #4
b2f commentedI can confirm that editing the setting manually with view and display like above get the view to show up (drupal config:edit entity_browser.browser.browse_files) where the entity browser is used.
Although I can't edit this setting from the Entity browser form, if I do, I get the op error:
Call to a member function getExecutable() on null in Drupal\entity_browser\Plugin\EntityBrowser\Widget\View->getForm().Note that the entity browser config form breadcrumb's "General information » Display » Widget selector » Selection display » Widgets" "Display", "WIdget Selector" and "Selection" steps form are just empty.
I tried using Drupal Core version 8.0.6, I may need upgrading to fix the issue.
Comment #5
albertski commentedI'm not able to see the drop downs again to select the views. So every time I need to make a change I go to configuration management and export/make changes/import.
Comment #6
albertski commentedComment #7
slashrsm commentedCould you share steps to reproduce this error?
I tried two scenarios (using 8.x-1.0-dev of entity browser and 8.x-3.x-dev of ctools, clean Drupal 8.2.x install):
- enabled entity_browser_example and ctools
- navigated to admin/config/content/entity_browser
- edited test_nodes entity browser
- navigated to the widget configuration step
- changed view in the dropdown
- saved
- made sure that the changes were saved in the configuration
- created new taxonomy view, added EB bulk form to it and created "Entity browser" display
- navigated to admin/config/content/entity_browser
- navigated to entity_browser add page
- created new entity browser (Single widget selector, iFrame display, No selection display)
- navigated to the widget config page
- selected the view that I created
- saved
- made sure that the changes were saved in the configuration
Comment #8
karens commentedDitto on not being able to select a view. I followed all the instructions and do not get a choice of a view to select. I did all that without enabling the example module, so I finally enabled the example module and tried that way, but still do not get any option to select a view. Using latest dev of entity browser, ctools, etc on 8.1.1. So maybe Drupal 8.1 doesn't work?
Comment #9
slashrsm commentedIt seems to be working with 8.1.x too. I suspect that something goes wrong when we call
Views::getApplicableViews('entity_browser_display');in \Drupal\entity_browser\Plugin\EntityBrowser\Widget\View::buildConfigurationForm(). "entity_browser_display" is a custom property that we added in the annotation for the entity browser display, which helps us finding views that can be used with the entity browser.Since I can't reproduce would be great if somebody that can would step-debug this in try to get any clues. I am happy to help. Ping me on IRC if needed.
Comment #10
bassam commentedMy problem seems to be that the view/display_id are not stored.
When I debug entity_browser/src/Plugin/EntityBrowser/SelectionDisplay/View.php in function "getForm" the following variables are NULL:
$this->configuration['view']
$this->configuration['view_display']
EDIT: It appears to be that I have to set the options as "iframe" and "no selection display" for this to work.
Any other options will result in that error.
Comment #11
slashrsm commentedBased on #10 tried reproduce one more time. Here is what I did:
- navigated to Entity browser add page
- On first step selected iFrame display, Tabs widget selector and Multi step selection display
- Left all except widgets parts on default values
- On widgets step I added 2 view widgets and one other widget
- Selected different view in each widget
- Saved
Configuration saved correctly. Here is the proof:
This should be obvious, but just to eliminate one potential issue. Make sure to press "Finish" on last step. Without that configuration won't be saved.
It would be great if someone that can reproduce could step-debug submit of the last step in config form and check what is happening with the values there.
Comment #12
DeFr commented@slashrsm I think there was a misunderstanding in there from the beginning. To reproduce the issue, you need to set the selection display to "View selection display" (it's not about the view widget); if you use that, then you definitely should get some configuration to show up in the wizard to set up the applicable view, but you don't.
At that point, when accessing the entity browser, you're then presented with the aforementionned Fatal error.
Setting to major, because it seems to be a rather common mistake made, and it's also a crash that can occur when using the wizard only. (Came up quite a bit when talking about Entity Browser in DrupalCamp Nantes, seems like a few people tried entity browser, used View selection display as a default choice, and then were presented with the fatal error and assumed it meant that the module wasn't ready)
Comment #13
slashrsm commentedThis makes sense. Configuration form was not created yet for this plugin. There is an issue about that: #2671816: Implement configuration form for View selection display (to set View and View display).
This should be a nice task for someone that would like to get involved as we can basically copy the form from the View widget. Ping me on IRC if interested and need help to get started.