Hello,
I have a problem with Panels 3.3 and Ctools 1.3 (I guess). I'm using Drupal 6.16.
I use the "Flexible Layout" in Panels to create a two-column-display for my user profile pages. On my local drupal installation everything works fine. But when it comes to the online version the display of my two columns breaks.
I've found, that panels (or ctools) creates a css file which provides the needed css code for the two-columns. The path to this css file is wrong and I don't know how to fix this :(.
Here's what I think causes the problem:
I was working on a local installation of drupal (Windows XP with EasyPHP as local server software).
In the file system settings (/admin/settings/file-system) the method is set to "private" and I didn't change the paths to the storage folders (the paths are pointing to "sites/default/files" and "sites/default/files/tmp" for the temp folder).
After finishing configuration and testing of my drupal installation it was ready to go online. I moved everything to my real webserver. Before I did this step I deleted all the dummy content I've created during my local tests. I also flushed all the image cache presets. You can say I deleted every single node. I did this because I'm aware of problems when it comes to the "file system settings". I wanted to have the storage folder outside the drupal root directory (I've read that when I use "private" as the download method I should move the "files" folder from "sites/default/files" to a location outside the drupal directory so nobody can find it).
So, I moved the folder to a location outside my drupal directory and changed the paths inside the "file system settings" to match with the new location. Everything seems to work just fine, i.e. when I create an image gallery all the thumbnails which were created during the upload process have been stored correctly inside the new files location. The thumbnails are created by using image cache.
Now back to the css file I was talking about earlier. On my local installation the path to the css file in the html source code is "/drupal-6.16-og-2/sites/default/files/ctools/css/ddef7a1bd466322de7e0864cb397e857.css?W".
"/drupal-6.16-og-2" is my drupal-root-directory and because the file-system is set to the relative path "sites/default/files", the path to the css file is correct.
On my online installation the path looks like this: "/community//serv/www/[MY_DOMAIN]/drupal_files/ctools/css/911d47b279461c2600c019bb9071d218.css?f".
You see the unnecessary "/community/" at the beginning? This is the drupal-root-directory but this must not be there.
The correct path should be like this "/serv/www/[MY_DOMAIN]/drupal_files/ctools/css/911d47b279461c2600c019bb9071d218.css?f".
How can I solve my problem? Is it Panels that creates the css file or is it ctools?
Would this problem be solved if I installed everything new?
Are there any database entries they need to be updated manually?
Thanks for any help! :)
Comments
I've checked some ".inc"
I've checked some ".inc" files from the panels.module (in particular "flexible.inc" at "sites/all/modules/panels/plugins/layouts/flexible") and the output of the path seems to be correct (at least at this point).
This function calls some ctools functions to get the needed css file. When I print the variable "$filename" I can see the correct path to the css file.
<?php
function theme_panels_flexible($id, $content, $settings, $display) {
panels_flexible_convert_settings($settings);
$renderer = new stdClass;
$renderer->settings = $settings;
$renderer->content = $content;
$renderer->css_id = $id;
$renderer->did = $display->did;
$renderer->id_str = $id ? 'id="' . $id . '"' : '';
$renderer->admin = FALSE;
// CSS must be generated because it reports back left/middle/right
// positions.
$css = panels_flexible_render_css($renderer);
if ($display->did && $display->did != 'new') {
ctools_include('css');
// Generate an id based upon rows + columns:
$css_id = 'flexible:' . $display->did;
$filename = ctools_css_retrieve($css_id);
if (!$filename) {
$filename = ctools_css_store($css_id, $css, FALSE);
}
drupal_add_css($filename, 'module', 'all', FALSE);
}
else {
// If the id is 'new' we can't reliably cache the CSS in the filesystem
// because the display does not truly exist, so we'll stick it in the
// head tag.
drupal_set_html_head("<style type=\"text/css\">\n$css</style>\n");
}
$output = "<div class=\"panel-flexible panel-flexible-$renderer->did clear-block\" $renderer->id_str>\n";
$output .= "<div class=\"panel-flexible-inside panel-flexible-$renderer->did-inside\">\n";
$output .= panels_flexible_render_items($renderer, $settings['items']['canvas']['children'], 'panel-flexible-' . $renderer->did);
// Wrap the whole thing up nice and snug
$output .= "</div>\n</div>\n";
return $output;
}
?>
The function "drupal_add_css()" returns an Array full of paths to css files. The path I'm looking for is also correct (see the last line of the sub array "module"):
Array
(
[all] => Array
(
[module] => Array
(
[modules/node/node.css] => 1
[modules/poll/poll.css] => 1
[modules/system/defaults.css] => 1
[modules/system/system.css] => 1
[modules/system/system-menus.css] => 1
[modules/user/user.css] => 1
[sites/all/modules/admin_menu/admin_menu.css] =>
[sites/all/modules/advanced_profile/theme/advanced_profile.css] => 1
[sites/all/modules/cck/theme/content-module.css] => 1
[sites/all/modules/ctools/css/ctools.css] => 1
[sites/all/modules/date/date.css] => 1
[sites/all/modules/date/date_popup/themes/datepicker.css] => 1
[sites/all/modules/date/date_popup/themes/timeentry.css] => 1
[sites/all/modules/filefield/filefield.css] => 1
[sites/all/modules/fivestar/css/fivestar.css] => 1
[sites/all/modules/fivestar/widgets/basic/basic.css] => 1
[sites/all/modules/node_gallery/node_gallery.css] => 1
[sites/all/modules/og/theme/og.css] => 1
[sites/all/modules/panels/css/panels.css] => 1
[sites/all/modules/tagadelic/tagadelic.css] => 1
[sites/all/modules/user_relationships/user_relationships_ui/user_relationships_ui.css] => 1
[modules/forum/forum.css] => 1
[sites/all/modules/cck/modules/fieldgroup/fieldgroup.css] => 1
[sites/all/modules/panels/plugins/layouts/flexible/flexible.css] => 1
[sites/all/modules/author_pane/author_pane.css] => 1
[sites/all/modules/views/css/views.css] =>
[/serv/www/[MY_DOMAIN]/drupal_files/ctools/css/911d47b279461c2600c019bb9071d218.css] =>
)
[theme] => Array
(
[themes/garland/style.css] => 1
[themes/garland/custom_styles/css_injector_1.css] => 1
[themes/garland/custom_styles/css_injector_2.css] => 1
[themes/garland/custom_styles/css_injector_3.css] => 1
[themes/garland/custom_styles/css_injector_4.css] => 1
[themes/garland/custom_styles/css_injector_5.css] => 1
[themes/garland/custom_styles/css_injector_6.css] => 1
[themes/garland/custom_styles/css_injector_7.css] => 1
[themes/garland/custom_styles/css_injector_8.css] => 1
)
)
[print] => Array
(
[module] => Array
(
)
[theme] => Array
(
[themes/garland/print.css] => 1
)
)
)
Is it possible that my .htaccess file interferes at some point and adds the unwanted part "/community/" to the path? All I changed was the "RewriteBase"
RewriteBase /communityWhat happens to the information?
There's critical bug in
There's critical bug in CTools which causes CSS files to be removed on cron
http://drupal.org/node/717036
Maybe it's your case ?
Thanks for your reply, crea.
Thanks for your reply, crea. I'm sorry I wasn't able to answer you last week.
I don't see how this bug hase something to do with my problem? I didn't experience any caching problems. It's the path to the generated css file that is wrong.
Maybe some one can help me on this one, please?
Issue found
I've found an issue which describes the same problem:
http://drupal.org/node/505132
Maybe some one can help!
I had this after transfer
I had this after transfer from a local server. Probably to do with database root user permissions. I just deleted the ctools folder in plesk whilst signed in as admin (won't work through ftp) and recreated it with the correct permissions. Works a treat.