- Issue created by @Sandip Choudhury
- Status changed to Postponed: needs info
over 1 year ago 10:23am 14 November 2023 Would you please obtain the stack trace and explain to us how to configure a view that shows this bug?
- ðµðPhilippines mjgruta
Hi @Sandip, we had similar issues but we upgraded from Drupal 8 to 10. in our case, the user id 0 was missing in the users table. I just created one and it seems to work fine now.
- ðºðžUnited States inversed
I'm also experiencing this on a new build and I'm wondering how this issue happened. This post's comment provides a patch but I'd like to understand the underlying cause.
https://www.drupal.org/forum/support/post-installation/2019-12-23/unexpe... â
- ðºðžUnited States inversed
I found this which provides a possible explanation for how UID 0 is lost, what it does, and how to restore it:
https://www.drupal.org/docs/administering-a-drupal-site/troubleshooting-... â
- ðºðŠUkraine t1mm1 Kiev
Patch for d 10.3
I remove from index of results the record of missed entity and add log message with details.
It doesnt fix the reason of missed entity, but fix fatal + provide more details of it. - ðºðŠUkraine t1mm1 Kiev
Some update why this fatal error was happens.
Views gets result from database table, but when views trying to load entites in loadEntities (fucntion) it doesnt gets all entities. In my case the reason was in uncorectrly removed record of entity. Finnaly, it returned NULL, and get tryed to get maxCache from NULL.
If you will debug it, you see that in the assignEntitiesToResult function need to skip NULL and remove item from the result list.
The best solution as for me - it checks for empty on query level. But the perfomance will down.