1

I get WSOD when I try to access the views page (admin/structure/views).

I get the notice below in the error log followed by the error.

Notice: Undefined index: id in Drupal\Core\Config\Entity\Query\Query->Drupal\Core\Config\Entity\Query\@closure() (line 92 of /home/pierost0/public_html/core/lib/Drupal/Core/Config/Entity/Query/Query.php).

Drupal\Core\Entity\EntityMalformedException: The "view" entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\Entity->toUrl() (line 189 of /home/pierost0/public_html/core/lib/Drupal/Core/Entity/Entity.php).

I have disabled all views through Drush but there's seems to be one empty view. Take notice on the screenshot. An empty view is enabled.

enter image description here

Is that view my problem? Where are the views files, or entries in the db so I can have a look for the solution there.

5
  • drush cex and then examining the files core/config/sync/views.view.*.yml might be helpful for debugging.
    – Hudri
    Dec 7, 2018 at 15:48
  • The command didn't help. The path you are pointing doesn't exit. Mine is core/config/ and there's no sync folder.
    – pierostz
    Dec 7, 2018 at 15:58
  • 2
    The error says one of your views does not have an ID, in views thats the machine name.
    – No Sssweat
    Dec 8, 2018 at 15:52
  • 1
    Try using drush config-list to locate the config related to that view, then use drush config-delete $config (I would avoid directly editing the DB) Dec 13, 2018 at 14:29
  • @pierostz please go to your file /home/pierost0/public_html/core/lib/Drupal/Core/Entity/Entity.php and add kint('test'); and provide me backtrack callback (click icon plus in line →Called from <ROOT>/modules/contrib/devel/kint/kint.module:18 [kint()])
    – Jonh
    Dec 13, 2018 at 16:03

2 Answers 2

3

I had this very issue.

It turned out to be a corrupt view configuration.

For me this was views.view.media_entity_browser

I only found this by deleting views one by one until the views listing page at /admin/structure/views started working again.

Not sure how or when the view got corrupted.

3
  • Probably a combination of more messed up things including media_entity_browser_update_8100 Sep 20, 2021 at 15:56
  • I had this exact issue, ALSO with views.view.media_enitity_browser view / config. I had run a drush CEX after a recent Core update, and that config file got generated, and I committed it. I didn't pay it much attention until I stumbled into the scenario described by this Question. Looking back at the config file, it was nearly empty, and obviously corrupted, and somehow Drupal imported it in that way (or generated the malformed config in the active directory, and then I exported it). I solved this by using drush config-delete drushcommands.com/drush-8x/config/config-delete Sep 30, 2021 at 14:58
  • Same here. I disabled the media_entity_browser module, deleted the entry views.view.media_entity_browser from the config table. Enable the module again twice, and was in a clean state again.
    – rémy
    Mar 29, 2022 at 18:49
-1

If you have access to the database check the table config for all entries starting with views.view.*
One of these entries might be empty or with a corrupt uuid. If so, take a backup of your database and try to manually delete this entry and see what happens.


Update According to coments below I suggest taking a database backup and then delete views one by one from the database until the error is gone

5
  • Thanks for the input. I'll have a look on that table.
    – pierostz
    Dec 11, 2018 at 7:53
  • Hey @Ismail Cherri. None of the views in the DB is empty. So I guess is a uuid issue. How can I find if uuid is corrupted or not?
    – pierostz
    Dec 13, 2018 at 10:01
  • If possible, can you paste the views data from the database? Or you can check them manually comparing uuids. It is difficult because each view contains a lot of data unfortunately but I can't think of anything else. Dec 13, 2018 at 11:51
  • Another thing to do, which is also daunting, is to delete them one by one until the error goes away! Take backup first of course Dec 13, 2018 at 11:52
  • I think at this point I will try the latter.
    – pierostz
    Dec 13, 2018 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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