It would be great to prevent the fields that have been excluded from display, from showing if the fields override has been allowed in a content pane.

Any thoughts?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

This behavior is actually intentional. You can give several different options and exclude them from display, so that the default is one way and it can easily be switched to another. For example, put the Body field in trimmed to different lengths, and easily show Body at 120 characters, 200chars, 400 chars, or full. For example.

There's already a request in elsewhere to limit what fields show in that list, but it would be an option rather than simply twigging on the already existing 'exclude' feature.

djdevin’s picture

Version: 7.x-3.2 » 7.x-3.x-dev
Status: Closed (won't fix) » Active

I'd like to reopen this issue.

I don't think it makes sense to a developer or end user that a field excluded from display in a view is set to display by default on a Panel pane instead.

Take this use case for example:

Setup
1) I create a view with a master display, then clone it to page, block, and a panel pane
2) I set the master display to have 3 fields
3) I exclude one of the fields from displaying

Test
1) When I add the views block to a page, 2 fields show
- OK
2) When I view the views page, 2 fields show
- OK
3) When I add the views panel pane to a panel, 2 fields show
- Fail, all 3 fields show.

It doesn't seem right that adding a page element in a different way (page, block vs panel pane) renders something differently without being explicitly configured that way.

To hand this functionality over to a user, and still let them have control over hiding fields (if they care) would require explanation that some fields have to always be unchecked first.

The screenshot in #0 is a solid solution - just disable the checkbox for that field by default when adding it as a panel pane. If you don't have an objection to this I'd write a patch.

kyoder’s picture

I agree with the above comment.
By default, the view should display the way it was configured...excluded fields should be excluded.
If the user wants to change that, then they can select the field in the pane settings.

merlinofchaos’s picture

The default setting *should* already be looking at the exclude flag when figuring out which fields should be checked and which shouldn't. If it's not, I agree that this would be a bug.

djdevin’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev
Component: Views panes » Views Content
Category: feature » bug
Status: Active » Needs review
FileSize
747 bytes

Cool - it's actually a ctools issue and super simple.

mkhamash’s picture

Issue summary: View changes

Confirm the patch #5 does works

humansky’s picture

Status: Needs review » Reviewed & tested by the community
dsnopek’s picture

RTBC +1

The patch at #5 works great for me too!

dsnopek’s picture

Issue tags: +panopoly

Marking this as a patch used in Panopoly

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Great, easy fix. Committed.

  • japerry committed bdd6489 on 7.x-1.x authored by djdevin
    Issue #1565782 by djdevin, adam-delaney: Exclude fields for Allowed...
dsnopek’s picture

Woohoo! Thanks. :-)

Status: Fixed » Closed (fixed)

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