Please excuse my ignorance if I am doing something wrong. I have created a view with fields and displayed it on a panels page. This gave me the option of which fields to show, and by default they were all checked. I then modified my view and removed a field. Viewing the page showed "broken handler" but the view was displaying fine in the preview, so I figured it was a panels problem. I modified the content and hit save and it works fine now.

I think what happened is that panels was storing the list of fields to view but not refreshing when the view was updated. I can think of two ways around this.

  1. Update panels cache (or whatever it is) when a view is saved.
  2. Have a checkbox "show all fields" when editing the pane. This differs to checking all of the boxes as this way it doesn't care if new fields are added or old fields are removed.
CommentFileSizeAuthor
#5 951678-display_all_fields.patch3.52 KBdawehner

Comments

mstrelan’s picture

Status: Active » Closed (works as designed)

Duh, I'm an idiot. If anyone is as dumb as I am go in to the view, under pane settings go "allow settings" and untick "fields".

merlinofchaos’s picture

I don't think that's dumb, it makes sense that you did that and didn't get the result you expected. I'll keep this in mind in the future when thinking about ways to make the UI better. Thanks for the feedback, this is valuable.

esmerel’s picture

Assigned: Unassigned » merlinofchaos
Category: support » task
Status: Closed (works as designed) » Active

After further discussion with merlinofchaos, we determined that one way to solve this is (for view panes, at least) is to add an on-by-default checkbox to automatically propagate newly added fields to the view pane.

I don't know that this solves the problem when you're going with "All views can be seen by panels", but it's at least a start.

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 6.x-3.7 » 6.x-1.x-dev
Component: Views panes » Code

This would be a CTools patch.

dawehner’s picture

Status: Active » Needs work
StatusFileSize
new3.52 KB

Here is a first patch.

TODO:

* Use dependency for the ui. If display all is checked the other fields should be hidden automatically.

merlinofchaos’s picture

I don't think this patch is quite what we're looking for here.

The checkbox more or less should be a checkbox that controls the behavior of fields that weren't selected.

Let's say I have a view with fields Foo and Bar and Fields Override was checked.

The user added a pane and selected 'Foo' and not 'Bar'.

Later on, I go and add 'Baz' as a field.

This checkbox should control the behavior of 'Baz' because the pane doesn't have a configuration item for it at all.

What that means is that the actual configured value for each field in the pane is:

Yes. No. Unknown (i.e, a selection has never been made). The checkbox, then, is how to be have if 'Unknown' was the answer.

mstrelan’s picture

I actually prefer the behaviour of #5. To enhance that it would be awesome if when you added a new field (baz) in the view a little message appeared somewhere saying "xx panels are overriding the display of fields in this pane, you may need to update the field settings"

But what you're suggesting in #6 may also work, I think I'd have to play with both to decide.

merlinofchaos’s picture

"xx panels are overriding the display of fields in this pane, you may need to update the field settings"

The implementation of the content system makes this actually impossible to know. There is no single place where this data is stored to query against. So you cannot do that.

merlinofchaos’s picture

Okay, I agree with the approach in #5 as well. Let's put my comments in #6 in addition to #5.

japerry’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Closing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)