To reproduce:

  1. Create the view:
    1. Create a views panel pane display with style = fields.
    2. Add arbitrary fields.
    3. Add a "global: text" field -- (may apply to other field types as well)
    4. Allow Settings: "fields override"
  2. Create the panel and add the pane:
    1. Create a panel
    2. Add the panel pane from above to the variant content
    3. Override the fields and include all.
  3. Edit the view pane display
  4. Remove the field "global: text" field from the view
  5. See "broken handler" on the panel

The issue is that the panel configuration doesn't get updated when the view gets saved.
Is there a hook_views_save_view or similar that i can tap into?

I'm happy to write the patch if someone can give me an idea of where to start looking.

Comments

Status:Active» Postponed (maintainer needs more info)

Hello!

Unfortunately, this issue has remained open, without activity, for a very long time. I hope you can understand that between maintaining the module, work, and other obligations, the maintainers are very busy. This leads to not all issues being answered.

In order to figure out which bugs that are still present, I'm going over all low activity bug reports that has not been touched for 6 months, and marking them "Postponed, needs info". In many cases, I expect the bug to have been solved by a newer version of Panels..

If you can still reproduce this issue with the latest dev version of Panels, please just reset it's status to active, and we'll try to work it out. Please remember to post any new information that may be relevant, such as any attempts of your own at debugging.

Regards, Letharion

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)

A month has passed, and I'm going over the issue queue ones more. Some issues have been closed for other reasons, some re-opened, but this issue has remained silent for the past month.
Because of this, I'm doing a bulk close of a number off issues. I'm sorry that it happened this way, but the issue queue has had to few contributors, and to many questions.

Again, as said in the previous comment, feel free to re-open the issue by setting it to active, if you still need help.

Regards, Letharion.

Status:Closed (cannot reproduce)» Active

This issue persists.

There is no way to do this automatically. Panels can be embedded in a lot of places, and they exist in code only.

The 'broken handler' on the panel is odd. Can you elaborate on this? Is this on the admin UI or on the actual panel output?

"broken handler" is displayed in the actual panel output.
I created a test view / panel with a cck field "field_signature_image" that i subsequently removed from the view without updating the panel.
Here's an example of the HTML output on the panel:

<div class="views-field views-field-field-signature-image-fid">
  <span class="views-label views-label-field-signature-image-fid">Broken handler .: </span>
  <span class="field-content"></span>
</div>

When I go back to panels UI and edit the panel, there is no trace of the field that was removed from the view.
But, in order to fix the panels output, the panel must be re-saved.

Personally, I would rather see an HTML comment (or maybe an error message, or nothing at all) in place of the missing field on the panel.
Maybe this is an issue that should be addressed in views instead?
Like I said, I'm happy to work on a patch, I just thought you might know off the top of your head where to start looking before I head down the rabbit hole.

Here's an export of the panel:
http://pastebin.com/dXNPmMi2

And here's the view:
http://pastebin.com/jA5QGvtH
(I don't know that these will actually help you, because once you import the panel and save it, the invalid setting and the reference to the removed field will most likely disappear.)

PS I'm using views 3 in this case, but I have observed the same behavior in views 2

I see. Panels is behaving incorrectly when a field does not exist; it should not be outputting broken handler. This should be an easy enough fix in the views_row.inc file.

I don't think this is a bug. There are situations where the current behaviour is the wanted one.
If you have three features, A containing a page, B and C containing different compontents that are displayed in the page, then you don't want the page to override your settings just because you only use B. The current behaviour will instead allow for a graceful fallback.

I would say this is a won't fix, but perhaps aaronbauman wants to argue to otherwise.

Project:Panels» Chaos tool suite (ctools)
Version:6.x-3.x-dev» 7.x-1.x-dev
Component:Views panes» Views Content
Status:Active» Needs review
StatusFileSize
new748 bytes
new748 bytes

Indeed, a one-liner.
in views_pane.inc, loop over fields returned by $view->get_items('field'), not fields in the pane's $conf['fields_override']

patches for 6.x-1.x-dev and 7.x-1.x-dev attached (they are identical, except for line numbers)

I don't understand your contention, Letharion.
How is displaying "Broken Handler" a more graceful fallback than displaying nothing?
The patch above does not override any settings, it simply ignores settings which do not apply to a given set of fields.

edit: i see we cross-posted. maybe this argument is moot now?

I agree, displaying "Broken handler" to the end user is almost certainly not the desired outcome. This is, IMO a bug.

Status:Needs review» Fixed

Committed to D6 and D7. Thanks for the patch!

Status:Fixed» Closed (fixed)

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