At the moment views attachments aren't rendered because they render arrays now, though they are handled as strings.

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new3.64 KB
new7.15 KB
tim.plunkett’s picture

Status: Needs review » Needs work
Issue tags: +Needs change record
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayAttachmentTest.phpundefined
@@ -0,0 +1,59 @@
+  public function testAttachment() {

Should be protected ;)

+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayAttachmentTest.phpundefined
@@ -0,0 +1,59 @@
+    // @todo Try to understand why the initial loading doesn't rebuild the menu
+    // cache.

Isn't this #1828444: Display Plugin doesn't register menu entries on the first request in simpletest? If so it could link to it. Also, multiline @todo's should have the second line indented 2 more spaces

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new7.13 KB
new798 bytes

You never stop learning something new.

Updated the @todo (previously this was just a c&p from another issue).

Status: Needs review » Needs work
Issue tags: -Needs change record, -VDC

The last submitted patch, durpal-1861852-3.patch, failed testing.

tim.plunkett’s picture

Status: Needs work » Needs review
Issue tags: +Needs change record, +VDC

#3: durpal-1861852-3.patch queued for re-testing.

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett

While that retests (random failure), I'm going to see if I can improve the test some.

tim.plunkett’s picture

Assigned: tim.plunkett » Unassigned
StatusFileSize
new661 bytes
new7.14 KB

Hm, turned out I couldn't do much, just fixed the docblock.
I'd RTBC but I like following the rules.

damiankloip’s picture

Status: Needs review » Needs work
+++ b/core/modules/views/theme/theme.incundefined
@@ -96,8 +96,18 @@ function template_preprocess_views_view(&$vars) {
+  if (!empty($view->attachment_before)) {
+    $vars['attachment_before'] = $view->attachment_before;
+  }
+  else {
+    $vars['attachment_before'] = '';
+  }
+  if (!empty($view->attachment_after)) {
+    $vars['attachment_after'] = $view->attachment_after;
+  }
+  else {
+    $vars['attachment_after'] = '';
+  }

I guess this is for performance reasons, which is cool. We should default this to an empty array() though and not a string.

Otherwise this patch is lookin' goood.

dawehner’s picture

Assigned: Unassigned » dawehner

Working on that.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new7.15 KB
new707 bytes

Here we go.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community

Nice, as long as this is green. Don't see why it wouldn't be.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. And thanks for adding tests!

Status: Fixed » Closed (fixed)

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

xjm’s picture

Title: Views Attachments aren't rendered anymore » Change notice: Views Attachments aren't rendered anymore
Project: Drupal core » Views (for Drupal 7)
Version: 8.x-dev » 8.x-3.x-dev
Component: views.module » Documentation
Category: bug » task
Status: Closed (fixed) » Active

Moving to views for the change notice.

mustanggb’s picture

Priority: Major » Normal
Issue summary: View changes
chris matthews’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 8.x-3.x-dev » 8.7.x-dev
Component: Documentation » views.module
Assigned: dawehner » Unassigned

For more information as to why this issue was moved to the Drupal core project, please see issue #3030347: Plan to clean process issue queue

chris matthews’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 8.7.x-dev » 7.x-3.x-dev
Component: views.module » Code
Status: Active » Closed (outdated)

Moving back to the contributed Views issue queue and closing as outdated per https://www.drupal.org/project/views/issues/3030347#comment-13023447