Download & Extend

Notice: Undefined property: views_plugin_display_default::$panel_pane_display

Project:Chaos tool suite (ctools)
Version:7.x-1.2
Component:Views Content
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

I get this error when using a View pane in a Mini Panel:
Notice: Undefined property: views_plugin_display_default::$panel_pane_display in views_content_views_panes_content_type_render() (line 142 of /sites/all/modules/contrib/ctools/views_content/plugins/content_types/views_panes.inc).

Comments

#1

I solved this way. Do not know if this error have wider implications.

AttachmentSizeStatusTest resultOperations
1787898.patch832 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1787898.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#2

The error occurs when you delete a display in use.

#3

I was getting this error on every view. The patch in #1 has fixed it.

I'm attaching a reformatted patch wich can be applied using
patch -p1 < ctools-views-panes-undefined-property-1787898-#3.patch

AttachmentSizeStatusTest resultOperations
ctools-views-panes-undefined-property-1787898-#3.patch700 bytesIdleFAILED: [[SimpleTest]]: [MySQL] Fetch test patch: failed to retrieve [ctools-views-panes-undefined-property-1787898-#3.patch] from [drupal.org].View details | Re-test

#4

The patch in #3 is not downloadable.

#5

Status:active» needs review

Heh. Bug on drupal.org -- the # in the filename is not being encoded, but if I encode it manually I can download it.

This works: http://drupal.org/files/ctools-views-panes-undefined-property-1787898-%2...

#6

Status:needs review» needs work

The last submitted patch, ctools-views-panes-undefined-property-1787898-#3.patch, failed testing.

#7

I upload the patch corrected.

AttachmentSizeStatusTest resultOperations
ctools-views_panes_undefined_property-1787898-7.patch700 bytesIgnored: Check issue status.NoneNone

#8

#7 resolved the issue for me, but I'm actually glad the error happened, because it alerted me to the fact that there was missing content on the page in the watchdog logs, which would have otherwise gone unnoticed.

#9

Here is a proper review:

+++ b/views_content/plugins/content_types/views_panes.incundefined
@@ -139,7 +139,12 @@
+      !$view->display_handler->access($GLOBALS['user']) ¶
+      || !isset($view->display_handler->panel_pane_display) ¶
+      || !$view->display_handler->panel_pane_display
+      ¶

Three lines in the patch have trailing whitespace.

I'm still not sure this is a desired solution though, such as for the case mentioned in my previous comment, when its helpful to know that something is misconfigured. Could we replace the ugly php error, with a *separate* check for isset and use a meaningful error message if its not set?