6

When I go to admin/content I'm getting the following error, whereas at the same time node/{node_id} is accessible just fine.

The website encountered an unexpected error. Please try again later. Recoverable fatal error: Argument 1 passed to Drupal\views\Plugin\views\field\EntityOperations::getEntityTranslation() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /var/www-drupal/core/modules/views/src/Plugin/views/field/EntityOperations.php on line 116 and defined in Drupal\views\Plugin\views\field\EntityOperations->getEntityTranslation() (line 74 of core/modules/views/src/Entity/Render/EntityTranslationRenderTrait.php).

Can someone give me an insight what this error means and how I to solve it?

3
  • 4
    This happens when your database content is messed up and nodes are found by queries but can't be loaded. That can for example happen when importing content and you partially and incorrectly overwrite existing data or manually change something in node tables. You should open a bug report about handling this better. But until that is fixed, you need to debug this to find out which node ID this is meant to display and manually clean up the database.
    – Berdir
    May 9, 2016 at 20:18
  • Thanks for your insight , probably i need to restore the node table with a working copy .
    – KTM
    May 10, 2016 at 5:12
  • 1
    Thanks , i replaced the node and node_field_data tables with a backup , it worked fine ! , if you can add as an answer i will accept it .
    – KTM
    May 10, 2016 at 7:15

2 Answers 2

5

I understand that this is an old question / thread, but just want to post something that worked for me for future reference. Your mileage may vary.

  • Take a backup of the 'node_field_data' table.
  • Search and delete 'orphaned' rows on node_field_data by comparing against the nids on the 'node' table.
0

I had this error when I had wanted to go to 'Custom block library'. After debugging I discovered some inaccuracies in DB. In my case there were some extra rows in 'block_content_field_data' table. Those informations you can take from ResultRow $values (parameter of render() in EntityOperations.php).

I deleted the rows with id from ResultRow $values and it worked.

Remember of taking backup of you DB.

Not the answer you're looking for? Browse other questions tagged or ask your own question.