'Force using fields' option in display options doesn't make a View render fields

Created on 29 November 2016, about 8 years ago
Updated 15 September 2024, 4 months ago

Problem/Motivation

When enabling the option 'Force using fields' in the Views display options, this has no effect other then enabling the fields options. These fields are never actually rendered, nor do any of the options set for these fields (like rewriting) have any effect.

Steps to reproduce:
- Create a Content view
- Set format to Format:Unformatted list
- Set Show:Content | Teaser
- In the Format settings enable 'Force using fields'
- The Preview will show teasers, not fields

Proposed resolution

Make the option work

Remaining tasks

- find a fix
- add tests (it has zero test coverage currently)

User interface changes

none

API changes

none

Data model changes

none

Original report

"Rewrite results" working in Drupal 8.2.2 views but "Rewrite results" not working in Drupal 8.2.3 views

🐛 Bug report
Status

Closed: works as designed

Version

11.0 🔥

Component
Views 

Last updated 29 minutes ago

Created by

🇮🇳India mahapatra.tusar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    I wonder why you're using the display content option - if you want fields, why not use the fields display?

  • Status changed to Closed: works as designed 4 months ago
  • 🇦🇺Australia pameeela

    Yeah, I don't understand this report, I believe it works as designed. The force using field settings is to provide field-based functionality such as grouping or filtering when you are using a display mode. It even says this in the description:

    Force using fields
    If neither the row nor the style plugin supports fields, this field allows to enable them, so you can for example use groupby.

    AFAIK it is not intended to actually override the display; if this were the case, it wouldn't be possible to use grouping or field-based filters with a display mode. If you want your display to use fields, use the fields setting?

    Please reopen this if I've misunderstood.

Production build 0.71.5 2024