Jump to:
| Project: | Chaos tool suite (ctools) |
| Version: | 6.x-1.x-dev |
| Component: | Views Content |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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:
<?php
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?
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| views_content_plugin_display_ctools_context.patch | 1004 bytes | Ignored: Check issue status. | None | None |
Comments
#1
CTools 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.