Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#5 | 1565782-obey-view-display-defaults-5.patch | 747 bytes | djdevin |
config.jpg | 122.42 KB | adam-delaney |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedThis 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.
Comment #2
djdevinI'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.
Comment #3
kyoder CreditAttribution: kyoder commentedI 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.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedThe 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.
Comment #5
djdevinCool - it's actually a ctools issue and super simple.
Comment #6
mkhamash CreditAttribution: mkhamash commentedConfirm the patch #5 does works
Comment #7
humansky CreditAttribution: humansky commented#1565782-5: Exclude fields for Allowed Settings Fields Override works like a charm
Comment #8
dsnopekRTBC +1
The patch at #5 works great for me too!
Comment #9
dsnopekMarking this as a patch used in Panopoly
Comment #10
japerryGreat, easy fix. Committed.
Comment #12
dsnopekWoohoo! Thanks. :-)