Hello. In my project I use Drupal 6, last dev version of Ctools 6.x-1.x-dev (2012-Nov-30), Views 6.x-3.0 and Panels 6.x-3.10 modules.
I have several "Context" views placed in panel and I'd caught next problem: if I clear Drupal cache and then open page with my context view this view shows data correctly. But when I reload page my view became empty. I found that in case when view is empty method render() in plugin views_content_plugin_display_ctools_context doesn't call function template_preprocess_views_view(). This function have to be called from this code:
if (isset($info['preprocess functions']) && is_array($info['preprocess functions'])) {
foreach ($info['preprocess functions'] as $preprocess_function) {
if (function_exists($preprocess_function)) {
$preprocess_function($this->variables, $this->definition['theme']);
}
}
}
Array $info['preprocess functions'] contains value template_preprocess_views_view, but function template_preprocess_views_view() doesn't exists on this step. This function declared in Views module in theme/theme.inc file and this file is included only when Drupal theme registry is empty (functions _theme_build_registry() and _theme_process_registry()).
I've made a small patch to solve this problem (in attach) and have a questions: is this a Drupal bug? Why Drupal not include theme/theme.inc if theme registry cached? Or this is a Ctools problem? Or this is a problem only in my Drupal installation?
| Comment | File | Size | Author |
|---|---|---|---|
| views_content_plugin_display_ctools_context.patch | 1004 bytes | Romka |
Comments
Comment #1
merlinofchaos commentedCTools should never have to include views/theme/theme.inc -- that should always be automatically included by the theme system. Perhaps there is some kind of bug there or some kind of alter breaking the system.
Comment #2
joelpittetTriaging the 6.x issues, it's no longer supported.
Comment #3
lwalley commentedThis still appears to be an issue in D7, see comment #983072-2: views_content_plugin_display_ctools_context->render() doesn't include all files and results in blank panes .