If you have an attachment with only one linked display the summary code breaks,
because the storage got converted to protected properties some time ago.

There is test coverage for multiple displays but not for a single one, so that specific part of the code is never runned in the test.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Active » Needs review
FileSize
2.61 KB
3.4 KB

Here are both a test-only patch and one with a proper fix.

Status: Needs review » Needs work

The last submitted patch, drupal-1888954-tests.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review

Back to needs review.

tim.plunkett’s picture

#1: drupal-1888954-1.patch queued for re-testing.

dawehner’s picture

FileSize
3.32 KB

Rerole.

Status: Needs review » Needs work

The last submitted patch, drupal-1888954-5.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
3.33 KB

That one should work.

tim.plunkett’s picture

+++ b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayAttachmentTest.phpundefined
@@ -36,18 +36,32 @@ public function testAttachmentUI() {
+    $this->drupalGet($attachment_display_url);
+    $this->drupalPost(NULL, array('displays[page_1]' => 1), t('Apply'));
...
+    $this->drupalGet($attachment_display_url);
     $this->drupalPost(NULL, array('displays[default]' => 1, 'displays[page_1]' => 1), t('Apply'));

This drupalGet is redundant, they can be combined into the drupalPost

+++ b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayAttachmentTest.phpundefined
@@ -36,18 +36,32 @@ public function testAttachmentUI() {
+    $this->assertEqual(array_keys(array_filter($view->displayHandlers->get('attachment_1')->getOption('displays'))), array('page_1'), 'The attached displays got saved as expected');

What is the array_filter removing? No problem, just curious.

dawehner’s picture

FileSize
3.07 KB
3.64 KB

Let's better filter out the empty elements in the submit function.

dawehner’s picture

Issue tags: -VDC

#9: drupal-1888954-9.patch queued for re-testing.

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

The last submitted patch, drupal-1888954-9.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
FileSize
3.65 KB

Just a rerole.

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

The last submitted patch, drupal-1888954-12.patch, failed testing.

dawehner’s picture

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

#12: drupal-1888954-12.patch queued for re-testing.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed b0aa1ae and pushed to 8.x. Thanks!

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