- Issue created by @esdrasterrero
- @esdrasterrero opened merge request.
- @esdrasterrero opened merge request.
- Status changed to Needs review
about 1 year ago 1:29pm 25 May 2023 - last update
about 1 year ago Composer error. Unable to continue.
When executing a views bulk operations action (e.g.: Generate csv from selected view results) on a multilingual application. An error can occur if the node no longer exists, while still having data in the table node_field_data. The action tries to load the entity, which doesn't exist, and thus triggers an error.
Message Error: Call to a member function language() on null in Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor->getPageList() (line 267 of /var/www/html/web/modules/contrib/views_bulk_operations/src/Service/ViewsBulkOperationsActionProcessor.php)
Create one or more additional languages in the Drupal installation.
Make a node translatable.
Create one or more nodes in the default language with the status set to published.
Translate the created nodes into one or more languages.
Delete the row entry in the 'node' table with the id of one of the created nodes.
Add a views bulk operation field to the content view and include the action "Generate csv from selected view results". Save the view.
In the content overview, select all items in a non-default language and perform the "Generate csv from selected view results" action.
Initial thoughts:
In the \Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor::getPageList method, include an additional check on the entity to see if it is not null before continuing to process the action.
none
none
none
Needs review
4.1
Core