Hi all,
sorry for the unprecise bug report.
I have a panel which uses a views_content_plugin_display_ctools_context to display a selection of rows from a view.
While I kept clearing my registry cache at every page load everything worked fine. As soon I disabled it I got blank panes.
After some investigation I found out the culprit was inside views_content_plugin_display_ctools_context->render().
There is some code which mimics the view theming process without actually using the template part. It specifically include_onces the $info['file'] from theme registry, but doesn't take care of $info['include files'].
In my case the views/theme.inc wasn't being included thus making template_preprocess_views_view() unavailable and resulting in a blank pane.
I am sorry I can't be able to provide further steps to reproduce the bug. I am using a Zen sub theme.
I am attaching a couple of patches which use 2 slightly different approaches:
1. include all files in $info['include files'] unconditionally
2. include all files in $info['include files'] if the theme function is not defined.
| Comment | File | Size | Author |
|---|---|---|---|
| missing_include_files-cleaner.patch | 1.09 KB | flevour | |
| missing_include_files.patch | 815 bytes | flevour |
Comments
Comment #1
Ashlar commentedThis bug report has not been active for over six months. In an effort to clean-up the issue queue this item has been closed. If your modules are current and the report is still relevant please feel free to change the Status back to active.
Comment #2
lwalley commentedThis still appears to be an issue in D7. It is only noticeable if there is a views-view.tpl.php template in the theme, and if the view in use does not have any exposed filters or similar that independently loads "views/theme/theme.inc".
The issue, as described in the original post, is that "views_content_plugin_display_ctools_context::render()" only includes the template path and file, it does not include the other includes. When overriding the template in the theme, the template path and file are to the theme template, not to "views/theme/theme.inc" so "template_preprocess_views_view()" is not available and never called:
In D7, also including everything in "$info['includes']", solves the issue e.g. something like:
Since this issue is closed, I won't add a patch, but just wanted to make a note in case anyone else is running into this.