So I was following the documentation to make a new action from here:
https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo/creating...
We are using a multi-lingual site, and we get a white screen of death.
It blows up on
/views_bulk_operations/src/Form/ViewsBulkOperationsFormTrait.php on LINE 85
($entity->language()->getId() )
On my development environment, If I delete all of the other languages so that only the default english one remains, then it works fine.
Steps to reproduce:
- Go in your drupal instance to - admin/config/regional/language
- Click "add language" (Then add a language, any one, you get the idea)
- Then do what you'd normally do to create a new action in a new view like from the documentation. Go to the view - and it'll give the php fatal error saying something like so:
"The website encountered an unexpected error. Please try again later.
Error: Call to a member function getId() on null in Drupal\views_bulk_operations\Plugin\views\field\ViewsBulkOperationsBulkForm::calculateEntityBulkFormKey() (line 85 of modules/contrib/views_bulk_operations/src/Form/ViewsBulkOperationsFormTrait.php)."
If I just comment out that one line 85 of ViewsBulkOperationsFormTrait.php , then it works. We're on drupal core 8.6.7 and experimenting with your views_bulk_operations 8.x.2.4 version. Thanks
Comments
Comment #2
Chris CharltonUh oh. Maybe I added languages to my site before enabling VBO?
Comment #3
graber commentedPlease provide steps to reproduce, as I wasn't able to do it on a clean 8.6.9 core multi-language instance. There may be a problem because there's a similar issue (added as related).
Comment #4
graber commentedComment #5
Chris Charlton@dazdiggityz,
do you also have the following D8 Core patch applied? #2858890: Pager is not initialized in nested views in Drupal.views.ajaxViewActually, try this patch; it helped me: #3033689: Fire post execute events before loading entites in views
Comment #6
graber commentedClosing this due to lack of activity for 3 months.