Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
views.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Mar 2018 at 14:15 UTC
Updated:
8 Sep 2025 at 16:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mustanggb commentedComment #3
Senthil Kumar Kumaran commentedThis happened on a production deployment. This is a very important feature of Drupal 8 and need to be addressed on priority.
Comment #4
cilefen commentedPriorities are defined: https://www.drupal.org/core/issue-priority
It seems there has been no progress because insufficient information was provided.
Comment #5
handkerchiefDrupal 8.6.14
I received this error message after importing some configs:
Error: Unsupported operand types in Drupal\views\Entity\View->mergeDefaultDisplaysOptions() (line 483 of core/modules/views/src/Entity/View.php).I changed the View.php file a bit, then I received the error message:
Plugin ID 'default' was not found.I changed the View.php again and no error message appears again.
Comment #6
handkerchiefCorrection: The drupal warning message: "Plugin ID 'default' was not found." appears sometimes on the website. But no other log messages or something. So I don't know what exactly is missing. But the website and the views works fine. But without my patch, the fatal error comes back.
See also:
#2802255: Warning message "Plugin ID 'default' was not found.” seen after update to Group 8beta3
Comment #7
cilefen commentedComment #8
daffie commented@hankerchief: Could you post the view that when importing, causes the mentioned error.
Comment #9
lordzik commentedI got the same error. This this a view i'm trying to import using config manager (single element):
Patch from #5 works and brings whole page back to life.
Comment #10
pandaski commentedI am having the same issue with Drupal version 8.7.6 after I imported a single configuration via the interface.
Comment #11
pandaski commentedProblem/Motivation
After troubleshooting, there are two issues for this error:
The public function mergeDefaultDisplaysOptions has no check to `$options`
Steps to reproduce this issue
Test single item configuration:
Proposed resolution
Add a quick check to public function `mergeDefaultDisplaysOptions`
Please check the patch for details
Comment #12
rensingh99 commentedHi
I have reviewed the patch #11 and it worked as designed.
Below is my review:
1) I have installed Drupal 8.9.x with minimal profile.
2) I have deleted "Who's new" view from newly installed Drupal, And export "Who's new" view from another Drupal website.
3) After that I have tried to import "Who's new" view without applying patch then i got this error.
Error: Unsupported operand types in Drupal\views\Entity\View->mergeDefaultDisplaysOptions() (line 490 of C:\xampp\htdocs\drupal_test\core\modules\views\src\Entity\View.php)
4) When i import the "Who's new" view after applying patch. It's working great without any error.
Thanks,
Ren
Comment #13
alexpottThanks for filing this bug report and for fixing it. Bug fixing is very valuable. However in order to commit a bug fix we need an automated to test to prove that we've fixed the bug and ensure that we don't break it again in the future. For more information about writing tests in Drupal 8 see the following links:
Comment #14
tepelena commentedI am having a problem where we get "Plugin ID 'page_1' was not found." and the Views UI can not be accessed at all.
Comment #15
medinasod commentedConfirming the patch in comment #11 worked for me. Thank you, pandaski!
Comment #17
hidayat365 commentedI'm using 9.1.2 and got this message after importing views from another site. patch #11 works for me.
Could be this patch get merge to Drupal core?
Comment #18
ssankarsiva commented#11 Patch worked for me. Got error after importing a single view config.
Comment #19
charlie59 commentedCan confirm this is still an issue with drupal 8.9.18 and that the patch in #11 works.
Comment #20
avpadernoDrupal 8.9.x is in security support only.
Comment #21
sgroundwater commentedI was just moving some sites between hosts when I hit this error. I'm on 9.2.9, the patch in #11 set me straight, but I needed to remember to apply it after I moved the site. Patching core is no good. If acceptable, it'd be nice to get this committed. - Thanks
Comment #22
danflanagan8As explained in #23, there's no way to get this committed without first adding test coverage.
I'm interested in writing tests for this issue, but there are still no clear steps to reproduce. The comment in #11 comes close, but I don't understand why we would be importing the configuration for a Block as if it's the configuration for a View. That doesn't seem like a valid case to be testing against. Surely something like that should not simply be ignored, which is what the patch does.
What is a real world situation where this error results from "normal" behavior?
Comment #24
danflanagan8I wonder if this issue isn't a duplicate of #2008708: Validate views during import.
The steps to reproduce seem to boil down to "Import invalid Views configuration".
Comment #25
sgroundwater commentedI just upped to from 9.2.x to 9.3.0 and hit this issue. I may have applied this patch against my previous 9.2.x., I can't remember. Hacking core is bad, but if it fixes a white screen I'm all for it. Thanks for the patch in #11, this set me straight for the short-term.
FYI, drush wd-show:
Error: Unsupported operand types in Drupal\views\Entity\View->mergeDefaultDisplaysOptions() (line 436 ...
drush updb:
... In ProcessBase.php line 171:
Unable to decode output into JSON: Syntax error
Error: Unsupported operand types in Drupal\views\Entity\View->mergeDefaultDisplaysOptions() (line 436 ... /web/core/modules/view
s/src/Entity/View.php).
Comment #26
murilohp commentedHey everyone, I tried to write some tests based on the patch #11, the first test is a functional test to simulate the scenario reported in #11. The other test is a unit test to validate the
View::mergeDefaultDisplaysOptions.I'll move this issue to needs review, if you have any other idea for testing, or something to improve, please let me know.
Thanks!
Comment #27
murilohp commentedComment #28
danflanagan8Hi @murilohp,
Thanks for the tests! Since this issue is a bug report, it is important that we have a test-only patch that demonstrates that your new or updated test triggers the bug.
In other words, can you re-post your patch but without the fix from #11? You can included
FAILortest-onlyto the patch name so everyone knows that a failure is expected.Setting back to NW for that.
Comment #29
murilohp commentedHey @danflanagan8! Thanks for the response and the explanation, the following patch now is a test only patch. For this scenario, I don't think an interdiff is necessary, but if you want, I can upload the interdiff.
Thanks!
Comment #30
murilohp commentedComment #31
avpadernoComment #32
danflanagan8Hi @apaderno! I believe this issue was set to NR to get a review of the fail test(s) in #29. I'm going to set back to NR for that.
That said, this one definitely needs lots of work including an IS update with steps to reproduce. I'l add those tags. In #24 I suggest that this issue may be a duplicate of an older issue. It would be nice for someone to investigate that possibility before spending a ton of time on this issue.
Comment #33
codesmithThis just hit me. I imported a Webform containing an embedded view that was missing on the site. Resulted in WSOD on all urls. Patch in #11 allowed pages to load again.
Comment #36
smustgrave commentedBased on #32 moving to PNMI.
Did not test
Comment #37
mxr576Comment #38
smustgrave commentedFollowing up if anyone can update IS with steps, if no follow up could close out in 3 months.
Comment #39
smustgrave commentedSince there's been no follow up or summary update going to close out. Please re-open if still experiencing this and update summary using full template.
Thanks all.