Problem/Motivation

Custom modules / themes and other contrib modules like views_field_formatter use the API function of views: views_embed_view()

HEAD

In HEAD views_embed_view() returns the INNER views render array, so it doesn't include any kind of cacheability metadata, so using it can cause cache poisoning and introduce a potential security issue. For example views_embed_view() is used twice, it could show the same result for different views.

PATCH

With the patch views_embed_view() will not return the views render array, but rather the views element, which will be expanded on render time to the actual views render array.

Proposed resolution

Remaining tasks

User interface changes

API changes

The return value of views_embed_view() will still ultimately be a render array, but its structure will change, see https://www.drupal.org/node/2649352#comment-10818662 for details.

Data model changes

Comments

Pepe Roni created an issue. See original summary.

pepe roni’s picture

StatusFileSize
new2.61 KB

added missing (but important) configuration for article view display.

pepe roni’s picture

StatusFileSize
new32.78 KB
new12.34 KB

Additionally this happens to multiple value fields, too, if the formatter is configured to display the view for each occurence.
Multiple Views
If it ist configured to concat the values (eg with "+") and display the view only once, it works.
Single View

pepe roni’s picture

But why do you have to save the node to achieve the changes in the display formatter?

pol’s picture

Hi there,

Thanks for the bug report.

What I understand here is:

  • The delta value is not changing, it's always zero when the field is multiple and implode character is not set. It should incremental.
  • The values are the same for different fields.

Could you post some screenshot of your content type configuration, an overview of the fields and of the view ?
I'm unable to work on that today, but it will help me narrow the problem if I have screenshots.

pepe roni’s picture

Hi Pol,

you can start with a vanilla D8 installation and then import the configuration files from the zip file in the attachment of this issue. Then you can play with the data. Thanks to D8 it is now so easy to provide sample configuration ;)

And yes, you are right, I didn't catch that. The delta values are always incorrect. And the values are the same not only for different fields but for different occurrences of the field, too (see post #3). In post #3 the first arguments should vary from 99 to 97(99+98+97 is correct in the second case), the third argument should vary from 0 to 2 (0+1+2 in the second case).

And, don't forget to check this: the changes in the formatting should be applied immediately, not only after saving the node again.

BTW: what about the revision id? Wouldn't it be enough to pass the entity id, the revision id and the field delta to the view? Everything else could be determined by the view itself, especially the field value. Or, like viewfield does, pass the arguments by tokens (e.g. something like [node:name-of-field:value], [node:id], [node:name-of-field:delta])

pol’s picture

I'm unable to import the configuration.

The staged configuration cannot be imported, because it originates from a different site than this site. You can only synchronize configuration between cloned instances of this site.

pepe roni’s picture

  • Start with a vanilla D8
  • install and enable VFF
  • export the configuration
  • copy the config files out of the attachment into the exported configuration.tar.gz
  • import this configuration
  • you are done!

The synchronize tab will still list 6 changed config files as they are missing the uuid.

pol’s picture

I did less or more the same by including system.site.yml in the config archive, then it worked.

I'm actually trying to reproduce the problem, but so far, everything works fine here.

Don't forget that, if you change anything in the view, you'll have to edit the formatter, then SAVE it (very important), so the content can be refreshed.

pol’s picture

I'm sorry but I'm unable to reproduce the problem locally.

Here's a couple of screenshots...

pepe roni’s picture

StatusFileSize
new5.98 MB

I attached my sites-folder (containing a a sqlite database file) to show the problem... (user: me, password: me)

pol’s picture

Sorry no support of sqlite on my laptop, can you post screenshots ?

pepe roni’s picture

StatusFileSize
new14.09 KB
new42.39 KB
new48.03 KB
new29.35 KB
new35.21 KB
new26.9 KB
new75.15 KB

It does not depend on the database system. Checked with sqlite and mysql. Same behaviour. Attached you will find some additional screenshots.

I'm on Kubuntu linux 15.10 with PHP Version 5.6.11-1ubuntu3.1 and Apache/2.4.12 (Ubuntu)

pepe roni’s picture

I think it's a caching problem. I modified the plugin to show the parameters passed to views_embed_view and these were correct. When I add the view to other fields, they display the values of the last call of the view. When I save the node, the cache is refreshed and all field display the same values (of the first call of the view after cache refresh).

Played with drupal 8.0.3-dev without any success. Disabled caching in the view, in the views advanced settings and in admin/config/development/performance with no success.

So, what's wrong? Any Idea?

pepe roni’s picture

Title: wrong parameter passed if used more than once » Caching problem with views_embed_view?
Project: Views field formatter » Drupal core
Version: 8.x-1.1 » 8.0.x-dev
Component: Miscellaneous » views.module
Issue summary: View changes

I change the subject and project of this issue, as it seems to be a problem with caching in views (or my default settings in php.ini). Checked the problem with different (linux based) servers and all show equal faulty results.

dawehner’s picture

I'm wondering what does views field formatter actually do? I'm pretty sure its used in the wrong way

pepe roni’s picture

Maybe, but that's not the problem. The problem is: with Pol's environment it runs as expected, in my environment it does not. The parameters passed to views_embed_view are correct, but not correctly displayed in the view.

You can optimize the code, of course, and replace views_embed_view by loading the view only once per field and then render it with different parameters through the preview-Method. But this does not solve the problem (same results).

pol’s picture

Hi,

Just for the record, here's an explanation of the purpose of Views Field Formatter (VFF):

VFF provides for each field types a new field formatter of type: 'View' and allows you to select a View and to use its result instead of the original field value.

By default, the module sends 3 arguments to the selected View.

Those arguments in order are:

  1. Field value: The value of the field
  2. Entity ID: The ID of the entity the field belongs to
  3. Delta: If the field has multiple value, the delta. If not, zero.

Right now, the module works properly on my laptop because I've disabled the caching (see [#2598914]).
Indeed, if I enabled caching again, I run into problems.

pepe roni’s picture

Those settings described in [#2598914] work for me now, too. But what about production settings? I was only testing the configuration of that module and ran into the problems. One can't put this to production! Indeed it seems to be a core problem.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new1.69 KB
new2.15 KB

So I was about to propose the following change to views_field_formatter but then I realized, we need the same kind of behaviour in views_embed_view itself, to be sort of usable.

The last submitted patch, 20: views_field_formatter-2649352.patch, failed testing.

pepe roni’s picture

Thanks, Daniel. The patch for views_field_formatter seems to work. It could be so simple to use a render array instead of the render method (through views_embed_views) instead ;)

pol’s picture

Committed already and preparing a new stable release :-)

pol’s picture

The core patch is ok for me but the return format worries me.

The documentation of the function says:

* This function is meant to be called from PHP snippets, should one wish to
* embed a view in a node or something. It's meant to provide the simplest
* solution and doesn't really offer a lot of options, but breaking the function
* apart is pretty easy, and this provides a worthwhile guide to doing so.
*
* Note that this function does NOT display the title of the view. If you want
* to do that, you will need to do what this function does manually, by
* loading the view, getting the preview and then getting $view->getTitle().

Now that with that patch views_embed_views() will not return HTML anymore but a render array, should we update the documentation too ?

dawehner’s picture

Now that with that patch views_embed_views() will not return HTML anymore but a render array, should we update the documentation too ?

It already didn't do before the patch, it always returned a render array in d8. The only difference is that this one has cacheablity metadata added.

pol’s picture

Then it's perfectly fine for me.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me. I am just wondering why we never removed views_embed_view. The usage of it should be discouraged IMO, and we should mark it deprecated. I think we talked about removing it at some point, but this was years ago in Paris I think.

dawehner’s picture

I guess we have been just too lazy!

Maybe we should even deprecate it at that point in time?

tim.plunkett’s picture

Title: Caching problem with views_embed_view? » views_embed_view() should use a render array so metadata can bubble up

+1 for deprecating in a follow-up

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Well let's add @return documentation then ... but oh hum this is an API change. I think this patch should actually just become the deprecation... and tell people to use render arrays instead.

tim.plunkett’s picture

We could add views_embed_view_this_one_actually_works()

dawehner’s picture

@alexpott
I don't agree that we should consider this as change. I mean at some point there will be render caching involved in which case, you'll have security issues.
It is already a not really alterable render array, so I don't think we really consider this as API.

alexpott’s picture

@dawehner ok... so the security argument is compelling BUT we do have a problem with something that is using it and just joining to other strings to make an email for example. I'm not sure how this plays wrt to BC policy.

Plus do we need to do the access checks in views_embed_view() - don't we need the render array no matter what so that all cache contexts are present?

dawehner’s picture

and just joining to other strings to make an email for example. I'm not sure how this plays wrt to BC policy.

I don't understand your point. Its already a render array, so in order to make something useful, in emails you would need to render it to a string in the first place.
In that case it would not be a different output.

Plus do we need to do the access checks in views_embed_view() - don't we need the render array no matter what so that all cache contexts are present?

I think we ideally skip rendering but set always a #access.

xjm’s picture

Can we get an issue summary update? I'm having a lot of trouble evaluating the BC versus the security for this issue and I can't connect the dots between what is in the summary and what I see in the patch. Maybe we do not need all those full-screen screenshots there? And it would be good to document the implications of the BC break and of the potential cache poisoning/cache invalidation problem in the summary too.

For me, my initial reaction to this is that changing the return value structure of views_embed_view() is extremely disruptive, and would be off the table for a patch release especially. So yes, let's deprecate it it for sure (in another issue), but the fact is that a lot of sites rely on that function. But a clearer explanation in the issue summary would help make recommendations about the BC.

Also tagging for a CR, which this will need in any case and which might help clarify what exactly the BC break is. Thanks @dawehner!

P.S. -- I also do not understand @alexpott's first paragraph in #33.

dawehner’s picture

Issue summary: View changes

P.S. -- I also do not understand @alexpott's first paragraph in #33.

Yeah I think he believes that views_embed_view() returns a string or maybe that getting a render array and altering that is a valid way to interact with drupal.

For me, my initial reaction to this is that changing the return value structure of views_embed_view() is extremely disruptive

Do you really think so? Like how high is the chance that someone actually relies on the exact behaviour. For my point of view, people just care that something is rendered and don't look into a deep level of render array crap.

but the fact is that a lot of sites rely on that function.

All of those sites than have issues with security, in case there is any kind of dynamicness or what not.

I won't write a change record, I just don't have the power for that.

tim.plunkett’s picture

I can see the confusion, every part of the call path either has no @return is or documented to be a string.
The fact is, it returns an array via \Drupal\views\Plugin\views\display\DisplayPluginBase::render()

views_embed_view()
Drupal\views\ViewExecutable::preview()
Drupal\views\Plugin\views\display\DisplayPluginBase::preview()
Drupal\views\ViewExecutable::render()
Drupal\views\Plugin\views\display\DisplayPluginBase::render()
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index 1d18ee1..783a70b 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -66,8 +66,9 @@
   /**
    * Stores the rendered output of the display.
    *
-   * @see View::render
-   * @var string
+   * @see \Drupal\views\ViewExecutable::render()
+   *
+   * @var array|null
    */
   public $output = NULL;
 
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
index 659b3bb..7342d2b 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginInterface.php
@@ -396,6 +396,8 @@ public function renderMoreLink();
 
   /**
    * Renders this display.
+   *
+   * @return array
    */
   public function render();
 
@@ -501,6 +503,8 @@ public function buildRenderable(array $args = [], $cache = TRUE);
    * Renders the display for the purposes of a live preview.
    *
    * Also might be used for some other AJAXy reason.
+   *
+   * @return  array
    */
   function preview();
 
diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php
index 983b095..8a9811c 100644
--- a/core/modules/views/src/ViewExecutable.php
+++ b/core/modules/views/src/ViewExecutable.php
@@ -1348,7 +1348,7 @@ public function execute($display_id = NULL) {
    * @param string $display_id
    *   The machine name of the display, which should be rendered.
    *
-   * @return string|null
+   * @return array|null
    *   Return the output of the rendered view or NULL if something failed in the process.
    */
   public function render($display_id = NULL) {
@@ -1534,6 +1534,8 @@ public function executeDisplay($display_id = NULL, $args = array()) {
    * responsibility of the caller to check $view->access() or implement other
    * access logic. To render the view normally with access checks, use
    * views_embed_view() instead.
+   *
+   * @return array
    */
   public function preview($display_id = NULL, $args = array()) {
     if (empty($this->current_display) || ((!empty($display_id)) && $this->current_display != $display_id)) {
xjm’s picture

Thanks for the summary update @dawehner.

Do you really think so? Like how high is the chance that someone actually relies on the exact behaviour. For my point of view, people just care that something is rendered and don't look into a deep level of render array crap.

Well this is why I asked about a change record, because I could be totally misconstruing what the implications are in context of a site/module that is using it. :) There is a reason that render arrays are considered an internal API for sure; modules should not rely of the internal details of their structure and the fact that many things in Drupal must when altering them (because ArrayPI) is something we have to manage the disruption for.

Like a side-by-side comparison of the before and after return value would be good for the CR. Because DisplayPluginBase::preview() looks like a totally different animal. But this also goes back to the whole internal complexity around Views rendering that I have always struggled to grok anyway, so I could be misunderstanding.

Edit: I totally crossposted with @tim.plunkett; reading now.

xjm’s picture

For the cache poisoning problem generally, since it depends on the particular usecase, we could consider a middle ground where for 8.0.x we provide a warning or workaround to invalidate the cache somehow -- so no sites blow up, but we reduce the risk of cache poisoning between now and 8.1.0 (which is when the logical time is to change the render array structure if it's only a matter of one render array structure versus a different one, without any lost data or change of actual data type for other callers).

Now that I sort of grok @alexpott's example about emails (thanks @dawehner), I think that is not a concern. Sites/modules that want to email the output of a view or concatenate it with something else can renderPlain().

xjm’s picture

tim.plunkett’s picture

xjm’s picture

Issue tags: -Needs issue summary update +8.0.4 release notes, +Needs followup, +Triaged core major

I talked about this with @catch some more. We decided to allow this in a patch release with a release note mention because:

  • It used to be a string, and we never documented that we changed it to a render array, which means most developers probably don't even know it's a render array yet.
  • Fixing the cache poisoning risk is more important than avoiding disrupting some site out there that is doing crazy things inside that render array.

We're going to commit this issue (once it has a CR and the proper return docs for the changed method and is RTBC) as soon as possible after 8.0.3. Then the CR will go out and the 2 people on earth who might be affected by the internal disruption have some warning to fix it if needed. Let's also get that followup issue to deprecate this function.

I'm also upgrading this issue to major, because cache poisoning is bad and also because the original bug reported was pretty funky for doing something that seemed pretty normal.

Thanks @dawehner and @tim.plunkett for all your help clarifying what was going on here.

xjm’s picture

Issue summary: View changes
tim.plunkett’s picture

Priority: Normal » Major
alexpott’s picture

@dawehner the reason I thought this was an API change was...

   * @return string|null
   *   Return the output of the rendered view or NULL if something failed in the process.
   */
  public function render($display_id = NULL) {

So we need to fix the ViewExecutable::render() documentation in another issue. Ah.... looking at @tim.plunkett's comment in #37

I think this patch should at least add @return documentation to views_embed_view(). We're not changing the type of what we're return, as pointed out (and seen though testing) it is a render array, but we are changing the nature return value. For example, the output of views_embed_view('frontpage'); has changed...

From:

>>> views_embed_view('frontpage');
=> [
     "#theme" => [
       "views_view__frontpage__default",
       "views_view__default",
       "views_view__default",
       "views_view__frontpage",
       "views_view",
     ],
     "#view" => Drupal\views\ViewExecutable {#3343
       +storage: Drupal\views\Entity\View {#3344},
       +built: true,
       +executed: true,
       +args: [],
       +build_info: [
         "query" => Drupal\Core\Database\Driver\mysql\Select {#3321
           +"alterTags": [
             "views" => 1,
             "views_frontpage" => 1,
           ],
           +"alterMetaData": [
             "views_substitutions" => [
               "***ADMINISTER_NODES***" => 0,
               "***VIEW_OWN_UNPUBLISHED_NODES***" => 0,
               "***BYPASS_NODE_ACCESS***" => 0,
               "***CURRENT_USER***" => "0",
               "***CURRENT_VERSION***" => "8.1.0-dev",
               "***CURRENT_TIME***" => 1454514675,
               "***LANGUAGE_site_default***" => "en",
               "***LANGUAGE_language_interface***" => "en",
               "***LANGUAGE_language_content***" => "en",
             ],
           ],
         },
         "count_query" => Drupal\Core\Database\Driver\mysql\Select {#3050
           +"alterTags": [
             "views" => 1,
             "views_frontpage" => 1,
           ],
           +"alterMetaData": [
             "views_substitutions" => [
               "***ADMINISTER_NODES***" => 0,
               "***VIEW_OWN_UNPUBLISHED_NODES***" => 0,
               "***BYPASS_NODE_ACCESS***" => 0,
               "***CURRENT_USER***" => "0",
               "***CURRENT_VERSION***" => "8.1.0-dev",
               "***CURRENT_TIME***" => 1454514675,
               "***LANGUAGE_site_default***" => "en",
               "***LANGUAGE_language_interface***" => "en",
               "***LANGUAGE_language_content***" => "en",
             ],
           ],
         },
         "query_args" => [],
         "title" => Drupal\views\Render\ViewsRenderPipelineMarkup {#3018},
       ],
       +result: [],
       +total_rows: "0",
       +attachment_before: [],
       +attachment_after: [],
       +feedIcons: [],
       +exposed_data: [],
       +exposed_raw_input: [],
       +old_view: [],
       +parent_views: [],
       +is_attachment: null,
       +current_display: "default",
       +query: &2 Drupal\views\Plugin\views\query\Sql {#3317
         +tables: [
           "node_field_data" => [
             "node_field_data" => [
               "count" => 1,
               "alias" => "node_field_data",
             ],
           ],
         ],
         +relationships: [
           "node_field_data" => [
             "link" => null,
             "table" => "node_field_data",
             "alias" => "node_field_data",
             "base" => "node_field_data",
           ],
         ],
         +where: [
           1 => [
             "conditions" => [
               [
                 "field" => "node_field_data.promote",
                 "value" => 1,
                 "operator" => "=",
               ],
               [
                 "field" => "node_field_data.status",
                 "value" => 1,
                 "operator" => "=",
               ],
             ],
             "args" => [],
             "type" => "AND",
           ],
         ],
         +having: [],
         +orderby: [
           [
             "field" => "node_field_data_sticky",
             "direction" => "DESC",
           ],
           [
             "field" => "node_field_data_created",
             "direction" => "DESC",
           ],
         ],
         +groupby: [],
         +fields: [
           "node_field_data_sticky" => [
             "field" => "sticky",
             "table" => "node_field_data",
             "alias" => "node_field_data_sticky",
           ],
           "node_field_data_created" => [
             "field" => "created",
             "table" => "node_field_data",
             "alias" => "node_field_data_created",
           ],
           "nid" => [
             "field" => "nid",
             "table" => "node_field_data",
             "alias" => "nid",
           ],
         ],
         +distinct: false,
         +tags: [],
         +pager: null,
         +options: [
           "disable_sql_rewrite" => false,
           "distinct" => false,
           "replica" => false,
           "query_comment" => "",
           "query_tags" => [],
         ],
         +view: Drupal\views\ViewExecutable {#3343},
         +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340
           +view: Drupal\views\ViewExecutable {#3343},
           +handlers: [
             "field" => &4 [],
             "argument" => &5 [],
             "sort" => &6 [
               "sticky" => Drupal\views\Plugin\views\sort\Standard {#3339
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "node_field_data",
                 +tableAlias: "node_field_data",
                 +actualTable: null,
                 +realField: "sticky",
                 +field: "sticky",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "sticky",
                   "table" => "node_field_data",
                   "field" => "sticky",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "order" => "DESC",
                   "exposed" => false,
                   "expose" => [
                     "label" => "",
                   ],
                   "plugin_id" => "boolean",
                   "entity_type" => "node",
                   "entity_field" => "sticky",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "sort",
                   "id" => "standard",
                   "class" => "Drupal\views\Plugin\views\sort\Standard",
                   "provider" => "views",
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2777},
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2749},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2775},
                   "entity_type" => "node",
                   "entity field" => "sticky",
                 ],
                 +"is_handler": true,
                 +"position": 0,
               },
               "created" => Drupal\views\Plugin\views\sort\Date {#3096
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "node_field_data",
                 +tableAlias: "node_field_data",
                 +actualTable: null,
                 +realField: "created",
                 +field: "created",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "created",
                   "table" => "node_field_data",
                   "field" => "created",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "order" => "DESC",
                   "exposed" => false,
                   "expose" => [
                     "label" => "",
                   ],
                   "granularity" => "second",
                   "plugin_id" => "date",
                   "entity_type" => "node",
                   "entity_field" => "created",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "sort",
                   "id" => "date",
                   "class" => "Drupal\views\Plugin\views\sort\Date",
                   "provider" => "views",
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2749},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2769},
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2770},
                   "entity_type" => "node",
                   "entity field" => "created",
                 ],
                 +"is_handler": true,
                 +"position": 1,
               },
             ],
             "filter" => &8 [
               "promote" => Drupal\views\Plugin\views\filter\BooleanOperator {#3338
                 +no_operator: true,
                 +accept_null: false,
                 +value: true,
                 +operator: "=",
                 +group_info: "All",
                 +always_required: false,
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "node_field_data",
                 +tableAlias: "node_field_data",
                 +actualTable: null,
                 +realField: "promote",
                 +field: "promote",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "promote",
                   "table" => "node_field_data",
                   "field" => "promote",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "operator" => "=",
                   "value" => true,
                   "group" => 1,
                   "exposed" => false,
                   "expose" => [
                     "operator_id" => "",
                     "label" => "",
                     "description" => "",
                     "use_operator" => false,
                     "operator" => "",
                     "identifier" => "",
                     "required" => false,
                     "remember" => false,
                     "multiple" => false,
                     "remember_roles" => [
                       "authenticated" => "authenticated",
                     ],
                   ],
                   "is_grouped" => false,
                   "group_info" => [
                     "label" => "",
                     "description" => "",
                     "identifier" => "",
                     "optional" => true,
                     "widget" => "select",
                     "multiple" => false,
                     "remember" => false,
                     "default_group" => "All",
                     "default_group_multiple" => [],
                     "group_items" => [],
                   ],
                   "plugin_id" => "boolean",
                   "entity_type" => "node",
                   "entity_field" => "promote",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "filter",
                   "id" => "boolean",
                   "class" => "Drupal\views\Plugin\views\filter\BooleanOperator",
                   "provider" => "views",
                   "label" => Drupal\Core\StringTranslation\TranslatableMarkup {#2774},
                   "type" => "yes-no",
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2749},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2773},
                   "entity_type" => "node",
                   "entity field" => "promote",
                 ],
                 +"is_handler": true,
                 +"value_value": Drupal\Core\StringTranslation\TranslatableMarkup {#2774},
                 +"valueOptions": null,
                 +"position": 0,
               },
               "status" => Drupal\views\Plugin\views\filter\BooleanOperator {#3337
                 +no_operator: true,
                 +accept_null: false,
                 +value: true,
                 +operator: "=",
                 +group_info: "All",
                 +always_required: false,
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "node_field_data",
                 +tableAlias: "node_field_data",
                 +actualTable: null,
                 +realField: "status",
                 +field: "status",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "status",
                   "table" => "node_field_data",
                   "field" => "status",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "operator" => "=",
                   "value" => true,
                   "group" => 1,
                   "exposed" => false,
                   "expose" => [
                     "operator_id" => false,
                     "label" => "",
                     "description" => "",
                     "use_operator" => false,
                     "operator" => "",
                     "identifier" => "",
                     "required" => false,
                     "remember" => false,
                     "multiple" => false,
                     "remember_roles" => [
                       "authenticated" => "authenticated",
                     ],
                   ],
                   "is_grouped" => false,
                   "group_info" => [
                     "label" => "",
                     "description" => "",
                     "identifier" => "",
                     "optional" => true,
                     "widget" => "select",
                     "multiple" => false,
                     "remember" => 0,
                     "default_group" => "All",
                     "default_group_multiple" => [],
                     "group_items" => [],
                   ],
                   "plugin_id" => "boolean",
                   "entity_type" => "node",
                   "entity_field" => "status",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "filter",
                   "id" => "boolean",
                   "class" => "Drupal\views\Plugin\views\filter\BooleanOperator",
                   "provider" => "views",
                   "label" => Drupal\Core\StringTranslation\TranslatableMarkup {#2768},
                   "type" => "yes-no",
                   "use_equal" => true,
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2749},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2766},
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2767},
                   "entity_type" => "node",
                   "entity field" => "status",
                 ],
                 +"is_handler": true,
                 +"value_value": Drupal\Core\StringTranslation\TranslatableMarkup {#2768},
                 +"valueOptions": null,
                 +"position": 1,
               },
               "langcode" => Drupal\views\Plugin\views\filter\LanguageFilter {#3336
                 +value: [
                   "***LANGUAGE_language_content***" => "***LANGUAGE_language_content***",
                 ],
                 +operator: "in",
                 +group_info: "All",
                 +no_operator: false,
                 +always_required: false,
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "node_field_data",
                 +tableAlias: null,
                 +actualTable: null,
                 +realField: "langcode",
                 +field: "langcode",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "langcode",
                   "table" => "node_field_data",
                   "field" => "langcode",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "operator" => "in",
                   "value" => [
                     "***LANGUAGE_language_content***" => "***LANGUAGE_language_content***",
                   ],
                   "group" => 1,
                   "exposed" => false,
                   "expose" => [
                     "operator_id" => "",
                     "label" => "",
                     "description" => "",
                     "use_operator" => false,
                     "operator" => "",
                     "identifier" => "",
                     "required" => false,
                     "remember" => false,
                     "multiple" => false,
                     "remember_roles" => [
                       "authenticated" => "authenticated",
                     ],
                     "reduce" => false,
                   ],
                   "is_grouped" => false,
                   "group_info" => [
                     "label" => "",
                     "description" => "",
                     "identifier" => "",
                     "optional" => true,
                     "widget" => "select",
                     "multiple" => false,
                     "remember" => false,
                     "default_group" => "All",
                     "default_group_multiple" => [],
                     "group_items" => [],
                   ],
                   "plugin_id" => "language",
                   "entity_type" => "node",
                   "entity_field" => "langcode",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "filter",
                   "id" => "language",
                   "class" => "Drupal\views\Plugin\views\filter\LanguageFilter",
                   "provider" => "views",
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2749},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2758},
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2759},
                   "entity_type" => "node",
                   "entity field" => "langcode",
                 ],
                 +"is_handler": true,
                 +"position": 2,
               },
             ],
             "relationship" => &11 [],
             "header" => &12 [],
             "footer" => &13 [],
             "empty" => &14 [
               "area_text_custom" => Drupal\views\Plugin\views\area\TextCustom {#3334
                 +areaType: "empty",
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "views",
                 +tableAlias: null,
                 +actualTable: null,
                 +realField: "",
                 +field: "area_text_custom",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "area_text_custom",
                   "table" => "views",
                   "field" => "area_text_custom",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "empty" => true,
                   "tokenize" => false,
                   "content" => "No front page content has been created yet.",
                   "label" => "",
                   "plugin_id" => "text_custom",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "area",
                   "id" => "text_custom",
                   "class" => "Drupal\views\Plugin\views\area\TextCustom",
                   "provider" => "views",
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2837},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2850},
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2851},
                   "field" => "",
                 ],
                 +"is_handler": true,
                 +"position": 0,
               },
               "node_listing_empty" => Drupal\node\Plugin\views\area\ListingEmpty {#3333
                 +areaType: "empty",
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "node",
                 +tableAlias: null,
                 +actualTable: null,
                 +realField: "",
                 +field: "node_listing_empty",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "node_listing_empty",
                   "table" => "node",
                   "field" => "node_listing_empty",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "empty" => true,
                   "label" => "",
                   "plugin_id" => "node_listing_empty",
                   "entity_type" => "node",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "area",
                   "id" => "node_listing_empty",
                   "class" => "Drupal\node\Plugin\views\area\ListingEmpty",
                   "provider" => "node",
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2905},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2920},
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2921},
                   "entity_type" => "node",
                   "field" => "",
                 ],
                 +"is_handler": true,
                 +"position": 1,
               },
               "title" => Drupal\views\Plugin\views\area\Title {#3332
                 +areaType: "empty",
                 +query: &2 Drupal\views\Plugin\views\query\Sql {#3317},
                 +table: "views",
                 +tableAlias: null,
                 +actualTable: null,
                 +realField: "",
                 +field: "title",
                 +actualField: null,
                 +relationship: null,
                 +options: [
                   "id" => "title",
                   "table" => "views",
                   "field" => "title",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "empty" => true,
                   "title" => "Welcome to [site:name]",
                   "label" => "",
                   "plugin_id" => "title",
                 ],
                 +view: Drupal\views\ViewExecutable {#3343},
                 +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 +definition: [
                   "plugin_type" => "area",
                   "id" => "title",
                   "class" => "Drupal\views\Plugin\views\area\Title",
                   "provider" => "views",
                   "sub_type" => "empty",
                   "group" => Drupal\Core\StringTranslation\TranslatableMarkup {#2837},
                   "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2852},
                   "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2853},
                   "field" => "",
                 ],
                 +"is_handler": true,
                 +"position": 2,
               },
             ],
           ],
           +output: [
             "#theme" => [
               "views_view__frontpage__default",
               "views_view__default",
               "views_view__default",
               "views_view__frontpage",
               "views_view",
             ],
             "#view" => Drupal\views\ViewExecutable {#3343},
             "#pre_render" => [
               [
                 Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
                 "elementPreRender",
               ],
             ],
             "#rows" => [],
             "#attached" => &16 [
               "library" => [
                 "views/views.module",
               ],
               "drupalSettings" => [],
             ],
           ],
           +display: & [
             "display_options" => [
               "access" => [
                 "type" => "perm",
                 "options" => [
                   "perm" => "access content",
                 ],
               ],
               "cache" => [
                 "type" => "tag",
                 "options" => [],
               ],
               "empty" => [
                 "area_text_custom" => [
                   "admin_label" => "",
                   "content" => "No front page content has been created yet.",
                   "empty" => true,
                   "field" => "area_text_custom",
                   "group_type" => "group",
                   "id" => "area_text_custom",
                   "label" => "",
                   "relationship" => "none",
                   "table" => "views",
                   "tokenize" => false,
                   "plugin_id" => "text_custom",
                 ],
                 "node_listing_empty" => [
                   "admin_label" => "",
                   "empty" => true,
                   "field" => "node_listing_empty",
                   "group_type" => "group",
                   "id" => "node_listing_empty",
                   "label" => "",
                   "relationship" => "none",
                   "table" => "node",
                   "plugin_id" => "node_listing_empty",
                   "entity_type" => "node",
                 ],
                 "title" => [
                   "id" => "title",
                   "table" => "views",
                   "field" => "title",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "label" => "",
                   "empty" => true,
                   "title" => "Welcome to [site:name]",
                   "plugin_id" => "title",
                 ],
               ],
               "exposed_form" => [
                 "type" => "basic",
                 "options" => [
                   "submit_button" => "Apply",
                   "reset_button" => false,
                   "reset_button_label" => "Reset",
                   "exposed_sorts_label" => "Sort by",
                   "expose_sort_order" => true,
                   "sort_asc_label" => "Asc",
                   "sort_desc_label" => "Desc",
                 ],
               ],
               "filters" => [
                 "promote" => [
                   "admin_label" => "",
                   "expose" => [
                     "description" => "",
                     "identifier" => "",
                     "label" => "",
                     "multiple" => false,
                     "operator" => "",
                     "operator_id" => "",
                     "remember" => false,
                     "remember_roles" => [
                       "authenticated" => "authenticated",
                     ],
                     "required" => false,
                     "use_operator" => false,
                   ],
                   "exposed" => false,
                   "field" => "promote",
                   "group" => 1,
                   "group_info" => [
                     "default_group" => "All",
                     "default_group_multiple" => [],
                     "description" => "",
                     "group_items" => [],
                     "identifier" => "",
                     "label" => "",
                     "multiple" => false,
                     "optional" => true,
                     "remember" => false,
                     "widget" => "select",
                   ],
                   "group_type" => "group",
                   "id" => "promote",
                   "is_grouped" => false,
                   "operator" => "=",
                   "relationship" => "none",
                   "table" => "node_field_data",
                   "value" => true,
                   "plugin_id" => "boolean",
                   "entity_type" => "node",
                   "entity_field" => "promote",
                 ],
                 "status" => [
                   "expose" => [
                     "operator" => "",
                   ],
                   "field" => "status",
                   "group" => 1,
                   "id" => "status",
                   "table" => "node_field_data",
                   "value" => true,
                   "plugin_id" => "boolean",
                   "entity_type" => "node",
                   "entity_field" => "status",
                 ],
                 "langcode" => [
                   "id" => "langcode",
                   "table" => "node_field_data",
                   "field" => "langcode",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "operator" => "in",
                   "value" => [
                     "***LANGUAGE_language_content***" => "***LANGUAGE_language_content***",
                   ],
                   "group" => 1,
                   "exposed" => false,
                   "expose" => [
                     "operator_id" => "",
                     "label" => "",
                     "description" => "",
                     "use_operator" => false,
                     "operator" => "",
                     "identifier" => "",
                     "required" => false,
                     "remember" => false,
                     "multiple" => false,
                     "remember_roles" => [
                       "authenticated" => "authenticated",
                     ],
                     "reduce" => false,
                   ],
                   "is_grouped" => false,
                   "group_info" => [
                     "label" => "",
                     "description" => "",
                     "identifier" => "",
                     "optional" => true,
                     "widget" => "select",
                     "multiple" => false,
                     "remember" => false,
                     "default_group" => "All",
                     "default_group_multiple" => [],
                     "group_items" => [],
                   ],
                   "plugin_id" => "language",
                   "entity_type" => "node",
                   "entity_field" => "langcode",
                 ],
               ],
               "pager" => [
                 "type" => "full",
                 "options" => [
                   "items_per_page" => 10,
                   "offset" => 0,
                   "id" => 0,
                   "total_pages" => 0,
                   "expose" => [
                     "items_per_page" => false,
                     "items_per_page_label" => "Items per page",
                     "items_per_page_options" => "5, 10, 25, 50",
                     "items_per_page_options_all" => false,
                     "items_per_page_options_all_label" => "- All -",
                     "offset" => false,
                     "offset_label" => "Offset",
                   ],
                   "tags" => [
                     "previous" => "‹ Previous",
                     "next" => "Next ›",
                     "first" => "« First",
                     "last" => "Last »",
                   ],
                   "quantity" => 9,
                 ],
               ],
               "query" => [
                 "type" => "views_query",
                 "options" => [
                   "disable_sql_rewrite" => false,
                   "distinct" => false,
                   "replica" => false,
                   "query_comment" => "",
                   "query_tags" => [],
                 ],
               ],
               "row" => [
                 "type" => "entity:node",
                 "options" => [
                   "view_mode" => "teaser",
                 ],
               ],
               "sorts" => [
                 "sticky" => [
                   "admin_label" => "",
                   "expose" => [
                     "label" => "",
                   ],
                   "exposed" => false,
                   "field" => "sticky",
                   "group_type" => "group",
                   "id" => "sticky",
                   "order" => "DESC",
                   "relationship" => "none",
                   "table" => "node_field_data",
                   "plugin_id" => "boolean",
                   "entity_type" => "node",
                   "entity_field" => "sticky",
                 ],
                 "created" => [
                   "field" => "created",
                   "id" => "created",
                   "order" => "DESC",
                   "table" => "node_field_data",
                   "plugin_id" => "date",
                   "relationship" => "none",
                   "group_type" => "group",
                   "admin_label" => "",
                   "exposed" => false,
                   "expose" => [
                     "label" => "",
                   ],
                   "granularity" => "second",
                   "entity_type" => "node",
                   "entity_field" => "created",
                 ],
               ],
               "style" => [
                 "type" => "default",
                 "options" => [
                   "grouping" => [],
                   "row_class" => "",
                   "default_row_class" => true,
                   "uses_fields" => false,
                 ],
               ],
               "title" => "",
               "header" => [],
               "footer" => [],
               "relationships" => [],
               "fields" => [],
               "arguments" => [],
               "display_extenders" => [],
             ],
             "display_plugin" => "default",
             "display_title" => "Master",
             "id" => "default",
             "position" => 0,
             "cache_metadata" => [
               "contexts" => [
                 "languages:language_interface",
                 "url.query_args",
                 "user.node_grants:view",
                 "user.permissions",
               ],
               "max-age" => -1,
               "tags" => [],
             ],
           ],
           +options: [
             "title" => "",
             "enabled" => true,
             "display_comment" => "",
             "css_class" => "",
             "display_description" => "",
             "use_ajax" => false,
             "hide_attachment_summary" => false,
             "show_admin_links" => true,
             "use_more" => false,
             "use_more_always" => true,
             "use_more_text" => "more",
             "link_display" => "",
             "link_url" => "",
             "group_by" => false,
             "rendering_language" => "***LANGUAGE_entity_translation***",
             "access" => [
               "type" => "perm",
               "options" => [
                 "perm" => "access content",
               ],
             ],
             "cache" => [
               "type" => "tag",
               "options" => [],
             ],
             "query" => [
               "type" => "views_query",
               "options" => [
                 "disable_sql_rewrite" => false,
                 "distinct" => false,
                 "replica" => false,
                 "query_comment" => "",
                 "query_tags" => [],
               ],
             ],
             "exposed_form" => [
               "type" => "basic",
               "options" => [
                 "submit_button" => "Apply",
                 "reset_button" => false,
                 "reset_button_label" => "Reset",
                 "exposed_sorts_label" => "Sort by",
                 "expose_sort_order" => true,
                 "sort_asc_label" => "Asc",
                 "sort_desc_label" => "Desc",
               ],
             ],
             "pager" => [
               "type" => "full",
               "options" => [
                 "items_per_page" => 10,
                 "offset" => 0,
                 "id" => 0,
                 "total_pages" => 0,
                 "expose" => [
                   "items_per_page" => false,
                   "items_per_page_label" => "Items per page",
                   "items_per_page_options" => "5, 10, 25, 50",
                   "items_per_page_options_all" => false,
                   "items_per_page_options_all_label" => "- All -",
                   "offset" => false,
                   "offset_label" => "Offset",
                 ],
                 "tags" => [
                   "previous" => "‹ Previous",
                   "next" => "Next ›",
                   "first" => "« First",
                   "last" => "Last »",
                 ],
                 "quantity" => 9,
               ],
             ],
             "style" => [
               "type" => "default",
               "options" => [
                 "grouping" => [],
                 "row_class" => "",
                 "default_row_class" => true,
                 "uses_fields" => false,
               ],
             ],
             "row" => [
               "type" => "entity:node",
               "options" => [
                 "view_mode" => "teaser",
               ],
             ],
             "exposed_block" => false,
             "header" => [],
             "footer" => [],
             "empty" => [
               "area_text_custom" => [
                 "admin_label" => "",
                 "content" => "No front page content has been created yet.",
                 "empty" => true,
                 "field" => "area_text_custom",
                 "group_type" => "group",
                 "id" => "area_text_custom",
                 "label" => "",
                 "relationship" => "none",
                 "table" => "views",
                 "tokenize" => false,
                 "plugin_id" => "text_custom",
               ],
               "node_listing_empty" => [
                 "admin_label" => "",
                 "empty" => true,
                 "field" => "node_listing_empty",
                 "group_type" => "group",
                 "id" => "node_listing_empty",
                 "label" => "",
                 "relationship" => "none",
                 "table" => "node",
                 "plugin_id" => "node_listing_empty",
                 "entity_type" => "node",
               ],
               "title" => [
                 "id" => "title",
                 "table" => "views",
                 "field" => "title",
                 "relationship" => "none",
                 "group_type" => "group",
                 "admin_label" => "",
                 "label" => "",
                 "empty" => true,
                 "title" => "Welcome to [site:name]",
                 "plugin_id" => "title",
               ],
             ],
             "relationships" => [],
             "fields" => [],
             "sorts" => [
               "sticky" => [
                 "admin_label" => "",
                 "expose" => [
                   "label" => "",
                 ],
                 "exposed" => false,
                 "field" => "sticky",
                 "group_type" => "group",
                 "id" => "sticky",
                 "order" => "DESC",
                 "relationship" => "none",
                 "table" => "node_field_data",
                 "plugin_id" => "boolean",
                 "entity_type" => "node",
                 "entity_field" => "sticky",
               ],
               "created" => [
                 "field" => "created",
                 "id" => "created",
                 "order" => "DESC",
                 "table" => "node_field_data",
                 "plugin_id" => "date",
                 "relationship" => "none",
                 "group_type" => "group",
                 "admin_label" => "",
                 "exposed" => false,
                 "expose" => [
                   "label" => "",
                 ],
                 "granularity" => "second",
                 "entity_type" => "node",
                 "entity_field" => "created",
               ],
             ],
             "arguments" => [],
             "filter_groups" => [
               "operator" => "AND",
               "groups" => [
                 1 => "AND",
               ],
             ],
             "filters" => [
               "promote" => [
                 "admin_label" => "",
                 "expose" => [
                   "description" => "",
                   "identifier" => "",
                   "label" => "",
                   "multiple" => false,
                   "operator" => "",
                   "operator_id" => "",
                   "remember" => false,
                   "remember_roles" => [
                     "authenticated" => "authenticated",
                   ],
                   "required" => false,
                   "use_operator" => false,
                 ],
                 "exposed" => false,
                 "field" => "promote",
                 "group" => 1,
                 "group_info" => [
                   "default_group" => "All",
                   "default_group_multiple" => [],
                   "description" => "",
                   "group_items" => [],
                   "identifier" => "",
                   "label" => "",
                   "multiple" => false,
                   "optional" => true,
                   "remember" => false,
                   "widget" => "select",
                 ],
                 "group_type" => "group",
                 "id" => "promote",
                 "is_grouped" => false,
                 "operator" => "=",
                 "relationship" => "none",
                 "table" => "node_field_data",
                 "value" => true,
                 "plugin_id" => "boolean",
                 "entity_type" => "node",
                 "entity_field" => "promote",
               ],
               "status" => [
                 "expose" => [
                   "operator" => "",
                 ],
                 "field" => "status",
                 "group" => 1,
                 "id" => "status",
                 "table" => "node_field_data",
                 "value" => true,
                 "plugin_id" => "boolean",
                 "entity_type" => "node",
                 "entity_field" => "status",
               ],
               "langcode" => [
                 "id" => "langcode",
                 "table" => "node_field_data",
                 "field" => "langcode",
                 "relationship" => "none",
                 "group_type" => "group",
                 "admin_label" => "",
                 "operator" => "in",
                 "value" => [
                   "***LANGUAGE_language_content***" => "***LANGUAGE_language_content***",
                 ],
                 "group" => 1,
                 "exposed" => false,
                 "expose" => [
                   "operator_id" => "",
                   "label" => "",
                   "description" => "",
                   "use_operator" => false,
                   "operator" => "",
                   "identifier" => "",
                   "required" => false,
                   "remember" => false,
                   "multiple" => false,
                   "remember_roles" => [
                     "authenticated" => "authenticated",
                   ],
                   "reduce" => false,
                 ],
                 "is_grouped" => false,
                 "group_info" => [
                   "label" => "",
                   "description" => "",
                   "identifier" => "",
                   "optional" => true,
                   "widget" => "select",
                   "multiple" => false,
                   "remember" => false,
                   "default_group" => "All",
                   "default_group_multiple" => [],
                   "group_items" => [],
                 ],
                 "plugin_id" => "language",
                 "entity_type" => "node",
                 "entity_field" => "langcode",
               ],
             ],
             "display_extenders" => [],
           ],
           +displayHandler: null,
           +definition: [
             "parent" => "parent",
             "plugin_type" => "display",
             "register_theme" => true,
             "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2460},
             "short_title" => "",
             "admin" => "",
             "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2461},
             "id" => "default",
             "theme" => "views_view",
             "no_ui" => true,
             "class" => "Drupal\views\Plugin\views\display\DefaultDisplay",
             "provider" => "views",
             "contextual links" => [
               "entity.view.edit_form" => [
                 "route_name" => "entity.view.edit_form",
                 "route_parameters_names" => [
                   "view" => "id",
                 ],
               ],
             ],
           ],
           +"has_exposed": false,
         },
         +definition: [
           "parent" => "parent",
           "plugin_type" => "query",
           "register_theme" => true,
           "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2963},
           "short_title" => "",
           "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2961},
           "id" => "views_query",
           "class" => "Drupal\views\Plugin\views\query\Sql",
           "provider" => "views",
         ],
         +"count_field": [
           "table" => "node_field_data",
           "field" => "nid",
           "alias" => "nid",
           "count" => true,
         ],
         +"offset": 0,
       },
       +pager: Drupal\views\Plugin\views\pager\Full {#3331
         +current_page: 0,
         +total_items: "0",
         +options: [
           "items_per_page" => 10,
           "offset" => 0,
           "id" => 0,
           "total_pages" => 0,
           "expose" => [
             "items_per_page" => false,
             "items_per_page_label" => "Items per page",
             "items_per_page_options" => "5, 10, 25, 50",
             "items_per_page_options_all" => false,
             "items_per_page_options_all_label" => "- All -",
             "offset" => false,
             "offset_label" => "Offset",
           ],
           "tags" => [
             "previous" => "‹ Previous",
             "next" => "Next ›",
             "first" => "« First",
             "last" => "Last »",
           ],
           "quantity" => 9,
         ],
         +view: Drupal\views\ViewExecutable {#3343},
         +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
         +definition: [
           "parent" => "parent",
           "plugin_type" => "pager",
           "register_theme" => false,
           "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2924},
           "short_title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2902},
           "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2937},
           "id" => "full",
           "theme" => "pager",
           "class" => "Drupal\views\Plugin\views\pager\Full",
           "provider" => "views",
         ],
       },
       +display_handler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
       +displayHandlers: Drupal\views\DisplayPluginCollection {#3341},
       +style_plugin: Drupal\views\Plugin\views\style\DefaultStyle {#3318
         +options: [
           "grouping" => [],
           "row_class" => "",
           "default_row_class" => true,
           "uses_fields" => false,
         ],
         +view: Drupal\views\ViewExecutable {#3343},
         +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
         +definition: [
           "parent" => "parent",
           "plugin_type" => "style",
           "register_theme" => true,
           "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2945},
           "short_title" => "",
           "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2947},
           "id" => "default",
           "theme" => "views_view_unformatted",
           "display_types" => [
             "normal",
           ],
           "class" => "Drupal\views\Plugin\views\style\DefaultStyle",
           "provider" => "views",
         ],
       },
       +rowPlugin: Drupal\node\Plugin\views\row\NodeRow {#3319
         +base_table: "node_field_data",
         +base_field: "nid",
         +entityManager: Drupal\Core\Entity\EntityManager {#120
           +"_serviceId": "entity.manager",
         },
         +options: [
           "view_mode" => "teaser",
         ],
         +view: Drupal\views\ViewExecutable {#3343},
         +displayHandler: Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
         +definition: [
           "parent" => "parent",
           "plugin_type" => "row",
           "register_theme" => true,
           "id" => "entity:node",
           "class" => "Drupal\node\Plugin\views\row\NodeRow",
           "provider" => "node",
           "title" => Drupal\Core\StringTranslation\TranslatableMarkup {#2988},
           "help" => Drupal\Core\StringTranslation\TranslatableMarkup {#2989},
           "base" => [
             "node_field_data",
           ],
           "entity_type" => "node",
           "display_types" => [
             "normal",
           ],
           "short_title" => "",
         ],
         +"field_alias": "nid",
       },
       +row_index: null,
       +override_url: null,
       +override_path: null,
       +base_database: null,
       +field: &4 [],
       +argument: &5 [],
       +sort: &6 [],
       +filter: &8 [],
       +relationship: &11 [],
       +header: &12 [],
       +footer: &13 [],
       +empty: &14 [],
       +inited: true,
       +exposed_widgets: null,
       +preview: true,
       +get_total_rows: null,
       +build_sort: true,
       +many_to_one_tables: null,
       +dom_id: "d3c631e484b02bde63eb0345402dfcba372b978775d7da9b2850ae2631dbc40c",
       +element: [
         "#attached" => &16 [],
         "#cache" => [
           "keys" => [
             "page:0",
           ],
           "contexts" => [
             "languages:language_interface",
             "url.query_args",
             "user.node_grants:view",
             "user.permissions",
           ],
           "tags" => [
             "config:views.view.frontpage",
             "node_list",
           ],
           "max-age" => -1,
         ],
       ],
       +"build_time": 0.0021419525146484,
       +"execute_time": 0,
     },
     "#pre_render" => [
       [
         Drupal\views\Plugin\views\display\DefaultDisplay {#3340},
         "elementPreRender",
       ],
     ],
     "#rows" => [],
     "#attached" => &16 [],
   ]

To...

>>> views_embed_view('frontpage');
=> [
     "#type" => "view",
     "#name" => "frontpage",
     "#display_id" => "default",
     "#arguments" => [],
   ]
dawehner’s picture

Issue summary: View changes

Thank you alex for posting it

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new675 bytes
new2.63 KB
lokapujya’s picture

+++ b/core/modules/views/views.module
@@ -739,7 +743,12 @@ function views_embed_view($name, $display_id = 'default') {
     return;

Missing return argument.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Missing return argument.

This is alright, I mean this is a NULL.

lokapujya’s picture

Fine, I'd prefer to see explicit NULL on a non void function (one that also returns values) though, but don't care that much. Basically, because it puts an end to this https://www.drupal.org/node/2670726#comment-10875394.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!

I added issue credit for the initial discussion/STR and the clarifications on disruption.

  • catch committed a975f31 on 8.1.x
    Issue #2649352 by dawehner, borisson_: views_embed_view() should use a...

  • catch committed 192dcd1 on 8.0.x
    Issue #2649352 by dawehner, borisson_: views_embed_view() should use a...
xjm’s picture

Issue tags: -8.0.4 release notes +8.0.5 release notes

Status: Fixed » Closed (fixed)

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