Posted by Arnion on September 18, 2012 at 2:15pm
7 followers
| 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.
#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
#4
The patch in #3 is not downloadable.
#5
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
The last submitted patch, ctools-views-panes-undefined-property-1787898-#3.patch, failed testing.
#7
I upload the patch corrected.
#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?