Currently, somewhere along the way, we have broken the way a style plugin decides whether it can use fields.

Steps to reproduce
- Create a new view
- Create a new display for that view (E.g. page)
- Change row plugin type to fields (E.g. from 'Content', 'User', etc.. - entity)
- Fields plugin will be selected ok, but where you would expect to see fields (and link to add them) you will see 'The selected style or row format does not utilize fields.' text.

This should have a UI test to reproduce.

Files: 
CommentFileSizeAuthor
#21 d8-views-followup-remove-empty-file-2015999-21.patch81 byteseffulgentsia
PASSED: [[SimpleTest]]: [MySQL] 58,405 pass(es).
[ View ]
#15 2015999-15.patch6.97 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 58,157 pass(es).
[ View ]
#15 interdiff-2015999-15.txt711 bytesdamiankloip
#14 2015999-14.patch6.98 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 58,126 pass(es), 2 fail(s), and 0 exception(s).
[ View ]
#14 interdiff-2015999-14.txt721 bytesdamiankloip
#11 2015999-11.patch6.98 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 57,627 pass(es).
[ View ]
#11 interdiff-2015999-11.txt1.3 KBdamiankloip
#8 2015999-8.patch6.95 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 57,657 pass(es).
[ View ]
#8 interdiff-2015999-8.txt1 KBdamiankloip
#3 2015999-tests-only.patch5.59 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 58,126 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#3 2015999.patch6.53 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 57,266 pass(es).
[ View ]
#3 interdiff-2015999-3.txt4.1 KBdamiankloip
#1 vdc-style-fields-test-only.patch1.94 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 56,122 pass(es), 21 fail(s), and 1 exception(s).
[ View ]
#1 vdc-style-fields.patch2.88 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 56,410 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
vdc-style-fields.patch2.88 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 56,476 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
vdc-style-fields-test-only.patch1.15 KBdamiankloip
FAILED: [[SimpleTest]]: [MySQL] 56,692 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Comments

StatusFileSize
new2.88 KB
FAILED: [[SimpleTest]]: [MySQL] 56,410 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
new1.94 KB
FAILED: [[SimpleTest]]: [MySQL] 56,122 pass(es), 21 fail(s), and 1 exception(s).
[ View ]

Waaa, sorry. Let's add the usesRowPlugin option to the test style plugin too - so the test is fairer.

Status:Needs review» Needs work

The last submitted patch, vdc-style-fields.patch, failed testing.

StatusFileSize
new4.1 KB
new6.53 KB
PASSED: [[SimpleTest]]: [MySQL] 57,266 pass(es).
[ View ]
new5.59 KB
FAILED: [[SimpleTest]]: [MySQL] 58,126 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Forgot about the style plugin test. If we just move around the assertions and setUsesRowPlugin to FALSE instead of TRUE, we should be good for both tests.

Status:Needs work» Needs review

Changing status for tests.

Status:Needs review» Needs work
Issue tags:-VDC

The last submitted patch, 2015999.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+VDC

#3: 2015999.patch queued for re-testing.

+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.phpundefined
@@ -50,45 +50,46 @@ protected function setUp() {
+    $view->style_plugin->setUsesRowPlugin(FALSE);
+    $this->assertTrue($view->style_plugin instanceof StyleTestPlugin, 'Make sure the right style plugin class is loaded.');

Should we also check that $view->rowPlugin is now not an instance of RowTest?

Beside from this, this looks perfect.

StatusFileSize
new1 KB
new6.95 KB
PASSED: [[SimpleTest]]: [MySQL] 57,657 pass(es).
[ View ]

Yeah. let's do it! I thought we might as well check that it is using the Fields row plugin instead.

Status:Needs review» Reviewed & tested by the community

Thank you!

Status:Reviewed & tested by the community» Needs work

+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTest.phpundefined
@@ -50,45 +51,47 @@ protected function setUp() {
-    $this->assertTrue(strpos($output, $random_text) !== FALSE, 'Take sure that the rendering of the style plugin appears in the output of the view.');

I know it's already there, but two cases of 'Take sure' in lines that are changed.

Status:Needs work» Needs review
StatusFileSize
new1.3 KB
new6.98 KB
PASSED: [[SimpleTest]]: [MySQL] 57,627 pass(es).
[ View ]

Fair point, changed those lines.

Status:Needs review» Reviewed & tested by the community

I'm sorry for all the "take" sure all over the place.

Status:Reviewed & tested by the community» Needs work

+++ b/core/modules/views/tests/modules/views_test_data/lib/Drupal/views_test_data/Plugin/views/style/StyleTest.phpundefined
@@ -34,6 +34,13 @@ class StyleTest extends StylePluginBase {
+   * Does the style plugin allows to use style plugins.

This should be something like... Can the style plugin use row plugins.

Status:Needs work» Needs review
StatusFileSize
new721 bytes
new6.98 KB
FAILED: [[SimpleTest]]: [MySQL] 58,126 pass(es), 2 fail(s), and 0 exception(s).
[ View ]

Yep, sure. Fixed.

StatusFileSize
new711 bytes
new6.97 KB
PASSED: [[SimpleTest]]: [MySQL] 58,157 pass(es).
[ View ]

Errhhhmm, Let's try that again.

Status:Needs review» Reviewed & tested by the community

And back again.

+1

Status:Reviewed & tested by the community» Fixed

Committed 62ed405 and pushed to 8.x. Thanks!

Status:Fixed» Needs work

diff --git a/core/git b/core/git
new file mode 100644

What's this file for?

Good question!

Status:Needs work» Needs review
StatusFileSize
new81 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,405 pass(es).
[ View ]

In case it's not there for a reason, here's the patch to remove it.

Status:Needs review» Reviewed & tested by the community

Would be cool to understand what added the file in the first place.

Its a mistake, beyond doubt.

Looks like it got added in #8. assume it was just an accident on the command line. things happen and its hard to see in the patch. RTBC for sure. Maybe the first 0 line patch? ;)

Status:Reviewed & tested by the community» Fixed

Whoops should have caught that on review... my bad.

Committed f36f480 and pushed to 8.x. Thanks!

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

Issue summary:View changes

Updated issue summary.