Trying to edit views gives me the following error:

Fatal error: Call to a member function get() on a non-object in /core/modules/views/src/DisplayPluginCollection.php on line 35

Viewing any of the views on the site gives me a WSOD with no errors.

Please help.

Offending function:

  /**
   * Constructs a DisplayPluginCollection object.
   *
   * @param \Drupal\views\ViewExecutable $view
   *   The view which has this displays attached.
   * @param \Drupal\Component\Plugin\PluginManagerInterface $manager
   *   The manager to be used for instantiating plugins.
   */
  public function __construct(ViewExecutable $view, PluginManagerInterface $manager) {
    parent::__construct($manager, $view->storage->get('display'));

    $this->view = $view;
    $this->initializePlugin('default');
  }

Comments

codehitman created an issue. See original summary.

codehitman’s picture

Title: Fatal error: Call to a member function get() on a non-object in /srv/bindings/1be9a456be0e476e8b4fabd5565ada2d/code/core/modules/views/src/DisplayPluginCollection.php on line 35 » Fatal error: Call to a member function get() on a non-object in /core/modules/views/src/DisplayPluginCollection.php on line 35
Issue summary: View changes
codehitman’s picture

Issue summary: View changes
codehitman’s picture

cilefen’s picture

It seems the view storage config entity is gone.

codehitman’s picture

Thanks cilefen! How do I fix that? Is that a common problem? I'm not sure how I managed that. The last module I installed was Panelizer. Views was working then; no additional core changes (module install, etc) had been made.

cilefen’s picture

I don't know what is going on, that was just an observation. Can you trace back any changes that were made between when these were working and now?

codehitman’s picture

Status: Active » Closed (cannot reproduce)

I had an old backup of the site (thankfully), reverting to it got everything working for me. I couldn't reproduce this error again, so am closing this issue for the time being.

Thanks for all your help cilefen!