Tests for: FATAL error when a view with a placed block is disabled or removed

Created on 13 June 2013, over 11 years ago
Updated 16 August 2024, 4 months ago

from #1879774: Catch plugin exceptions for invalid views display plugins β†’ , reported by oadaeh:

I did a brand new install with D8 code downloaded less than an hour ago (which means the committed changes from this issue are in it) into a new database, and then performed the following steps:

Created a view (of users) with a block display
Placed that block in a region
Deleted the view
Displayed or refreshed a page that has the block on it
I get a WSOD. (When I did this last night, I was also getting an error message, but I'm not getting it now, so I can't post it).

I get this from Apache:
PHP Fatal error: Call to a member function access() on a non-object in /.../core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php on line 56

If I delete the associated .yml file, everything is fine again.

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->
πŸ“Œ Task
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
BlockΒ  β†’

Last updated 2 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom damiankloip

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I tested on Drupal 11.x, standard install, using the steps in the issue summary. I was not able to reproduce the problem. Presumably because the block is deleted when the view is deleted.

Production build 0.71.5 2024