Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293320

Views attachments are not rendered in the specified order

$
0
0

Problem/Motivation

When a view uses multiple attachments to be displayed in the same location (e.g. all "above" or all "below"), they are added in order of their machine names, rather than the order specified in the view.
This behavior is not obvious to the user, and changing a display's machine names likely leads to unsemantic naming. If done at a later point, this can furthermore lead to problems because of the old machine name being used in code etc.

Steps to reproduce as an example:

  1. Create a "pets" view with a page and two attachment displays, "cats" and "dogs", both set to output "after" the page.
  2. Click on "Reorder displays" and sort them as "page_1", "dogs", "cats".
  3. On the pets page, the cats will be output before the dogs even though configured differently.

Proposed resolution

Since displays can be rearranged by the user, the attachments should adhere to this order.

Remaining tasks

Write a test for this scenario, review the patch.


Viewing all articles
Browse latest Browse all 293320

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>