I'm having a problem with views and patterns.

If I make something very simple like the following:

  tag: view
    action: update
    details:
      name: view_test
      description: This is a test view
      tag: test
      base: node
    display:
      - name: default
        section:
          - name: row_plugin
            value: node

Then when I go to view_test, the row_plugin will still be set to fields.

I've tracked this down the to values array that gets passed to form state having the wrong key. Instead of looking like

array(
  'values' => array(
    'row_plugin' => 'node',
  ),
);

it looks like:

array(
  'values' => array(
    'default' => 'node',
  ),
);

I can see that this most likely has something to do with the #default_key and #key config settings, but I'm not sure where to go from here. I don't think its the way the YAML is specified. Any ideas?

Comments

cdale’s picture

Ok, so I now know what I said in my original post was incorrect. The default key is in fact as it should be. The real problem seems to be that the 'section' key in the form state is NULL. From what I can see, that seems to be something to do with how the YAML data is put together?

cdale’s picture

Title: Views section settings don't get set » Views section documenation incorrect?
Category: bug » support

Ok, so after digging around, and messing around, I found that if I change that YAML given above to the following, it works.

  tag: view
    action: update
    details:
      name: view_test
      description: This is a test view
      tag: test
      base: node
    display:
      - name: default
        section:
          - section: row_plugin       <-- "name" was changed to "section".
            value: node

Any thoughts on why this might be? Is it just that the documentation is out of date?