Steps to reproduce:

  1. create a view
  2. add a first block display
  3. save the view
  4. add a second block display
  5. rename the second block display machine name to new_machine_name
  6. delete the second block display
  7. save the view

At this point the view is saved but a warning message appears:

Plugin ID 'new_machine_name' was not found.

If you go to /admin/structure/views you will get a WSOD:

Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "" plugin does not exist." at /var/www/example.com/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 52, referer: http://example.com/admin/structure

You need to manually delete the view from the database in order to restore the site.

Comments

FiNeX created an issue. See original summary.

arijits.drush’s picture

StatusFileSize
new692 bytes

This patch should work.

arijits.drush’s picture

Status: Active » Needs review
arijits.drush’s picture

StatusFileSize
new692 bytes
arijits.drush’s picture

arijits.drush’s picture

Component: views.module » views_ui.module
Issue tags: +Needs tests
arijits.drush’s picture

StatusFileSize
new692 bytes

Status: Needs review » Needs work

The last submitted patch, 7: WSOD-2810057-1.patch, failed testing.

The last submitted patch, 7: WSOD-2810057-1.patch, failed testing.

arijits.drush’s picture

StatusFileSize
new699 bytes
arijits.drush’s picture

Status: Needs work » Needs review
arijits.drush’s picture

StatusFileSize
new698 bytes

Sorry For the Inconvenience but Patch #2 will not work correctly.

The last submitted patch, 10: WSOD-2810057-2.patch, failed testing.

dawehner’s picture

Status: Needs review » Needs work

Let's ensure to add tests

arijits.drush’s picture

Status: Needs work » Needs review
arijits.drush’s picture

Added Test for #12

lendude’s picture

Version: 8.1.10 » 8.2.x-dev
Status: Needs review » Needs work

@arijits.drush No patch in #15-#16?

lendude’s picture

Status: Needs work » Needs review
StatusFileSize
new1.12 KB
new1.8 KB

Here is what I had before I saw #16.

The last submitted patch, 18: delete_new_display-2810057-18-TEST_ONLY.patch, failed testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

This looks great. Thank you for writing a test @Lendude!

Personally I'm not convinced that this is major, but meh.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed db7834d to 8.3.x and a9dd6b9 to 8.2.x. Thanks!

  • alexpott committed db7834d on 8.3.x
    Issue #2810057 by arijits.drush, Lendude: WSOD after renaming and...

  • alexpott committed a9dd6b9 on 8.2.x
    Issue #2810057 by arijits.drush, Lendude: WSOD after renaming and...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.