Hello!
I tried to add an operation links to a view that is based of the file entity. I figured this was similar to what VBO did in D7, etc. Anywho, it didn't like it, not sure if this is by design or a bug:
Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "file" entity type did not specify a list_builder handler. in Drupal\Core\Entity\EntityManager->getHandler() (line 360 of /code/core/lib/Drupal/Core/Entity/EntityManager.php).
My gut tells me we should be able to edit/delete files from a view. But things are a little bit different now in Drupal 8.
Steps to reproduce
- Install 8.0.x with the Standard profile.
- Visit
/admin/structure/views/view/files/edit/page_1. - Next to "Fields", click "Add".
- Type "operation" in the search and select "Operation links".
- Use the default options and save the field.
- Save the View.
- Visit
/admin/content/files. Confirm that the View is displayed correctly so long as there is no content on the site. - Add an article node with an image attachment.
- Visit
/admin/content/filesagain. You will receive an error.
Workaround
If you encounter this error with a files view, visit /admin/structure/views, edit the view, and remove the operation links field. Your view will start working again.
Why is this an RC target
If you select the entity operations field on a view of comments or files you get WSOD.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2587551-5.patch | 1.74 KB | alexpott |
Comments
Comment #2
xjmI confirmed this during a Drupal 8 demo today using RC2.
The view becomes completely unusable and stuck in an unrecoverable state afterward, so promoting to major.
Comment #3
xjmThe bug only happens when there are files on the site, so adding steps to reproduce.
Also discovered that the view is still editable (thankfully) and accessible from the Views admin UI. The exception is only thrown when viewing the view. So demoting back to normal.
Comment #4
xjmComment #5
alexpottComment #6
xjmLooks like this may be a duplicate of #2491875: EntityViewsData adds Operations links to all entities, which won't work if the entity type has no list builder, leading to WSOD on some views.
Comment #7
xjmLet's close this as a duplicate of the older issue. Thanks @alexpott for the patch and thanks @labboy0276 for reporting this.
Comment #8
xjm