I have no problem with my default language pages (english).

But CSS path, generated by CToolsAJAX, in other language pages are wrong. They include language prefix ("/fr/") at the beginning.
So i have many watchdog "page not found" errors because bots try to load them.

Javascript files path don't include this language prefix and they don't generate any error.

Here is same CToolsAJAX code for an "en" page and "fr" page. All CSS files with language prefix are wrong.
en

jQuery.extend(Drupal.settings, { "CToolsAJAX":
{ "scripts": {
"/sites/all/modules/jquery_update/replace/jquery.js?c": true,
"/misc/drupal.js?c": true,
"/sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js?c": true,
"/sites/all/modules/colorbox/js/colorbox.js?c": true,
"/sites/all/modules/colorbox/styles/default/colorbox_default_style.js?c": true,
"/sites/all/modules/dhtml_menu/dhtml_menu.js?c": true,
"/sites/all/modules/fivestar/js/fivestar.js?c": true,
"/sites/all/modules/lightbox2/js/auto_image_handling.js?c": true,
"/sites/all/modules/lightbox2/js/lightbox.js?c": true,
"/sites/all/modules/openads/openads.js?c": true,
"/sites/all/modules/rounded_corners/jquery.corner.js?c": true,
"/sites/all/modules/translatablecomments/jquery.translatablecomments.js?c": true,
"/sites/all/modules/sharethis/sharethis.js?c": true,
"/modules/openid/openid.js?c": true,
"/sites/all/modules/logintoboggan/logintoboggan.js?c": true,
"/sites/all/modules/google_analytics/googleanalytics.js?c": true
},
"css": {
"/modules/book/book.css?c": true,
"/modules/node/node.css?c": true,
"/modules/system/defaults.css?c": true,
"/modules/system/system.css?c": true,
"/modules/system/system-menus.css?c": true,
"/modules/user/user.css?c": true,
"/sites/all/modules/cck/theme/content-module.css?c": true,
"/sites/all/modules/colorbox/styles/default/colorbox_default_style.css?c": true,
"/sites/all/modules/ctools/css/ctools.css?c": true,
"/sites/all/modules/dhtml_menu/dhtml_menu.css?c": true,
"/sites/all/modules/filefield/filefield.css?c": true,
"/sites/all/modules/fivestar/css/fivestar.css?c": true,
"/sites/all/modules/flickr/flickr.css?c": true,
"/sites/all/modules/gmaps/misc/gmaps.css?c": true,
"/sites/all/modules/lightbox2/css/lightbox.css?c": true,
"/sites/all/modules/logintoboggan/logintoboggan.css?c": true,
"/sites/all/modules/simplenews/simplenews.css?c": true,
"/sites/all/modules/taxonomy_list/taxonomy_list.css?c": true,
"/sites/all/modules/translatablecomments/translatablecomments.css?c": true,
"/sites/all/modules/views/css/views.css?c": true,
"/sites/all/modules/taxonomy_image/taxonomy_image.css?c": true,
"/modules/openid/openid.css?c": true,
"/sites/all/modules/faceted_search/faceted_search_ui.css?c": true
} } });

fr

jQuery.extend(Drupal.settings, { "CToolsAJAX":
{ "scripts": {
"/sites/all/modules/jquery_update/replace/jquery.js?c": true,
"/misc/drupal.js?c": true,
"/sites/default/files/languages/fr_09ccfc3fbedaa390cc317b8a6a41bb0f.js?c": true,
"/sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js?c": true,
"/sites/all/modules/colorbox/js/colorbox.js?c": true,
"/sites/all/modules/colorbox/styles/default/colorbox_default_style.js?c": true,
"/sites/all/modules/dhtml_menu/dhtml_menu.js?c": true,
"/sites/all/modules/fivestar/js/fivestar.js?c": true,
"/sites/all/modules/lightbox2/js/auto_image_handling.js?c": true,
"/sites/all/modules/lightbox2/js/lightbox.js?c": true,
"/sites/all/modules/openads/openads.js?c": true,
"/sites/all/modules/rounded_corners/jquery.corner.js?c": true,
"/sites/all/modules/translatablecomments/jquery.translatablecomments.js?c": true,
"/sites/all/modules/sharethis/sharethis.js?c": true,
"/modules/openid/openid.js?c": true,
"/sites/all/modules/logintoboggan/logintoboggan.js?c": true,
"/sites/all/modules/google_analytics/googleanalytics.js?c": true
},
"css": {
"/fr/modules/book/book.css?c": true,
"/fr/modules/node/node.css?c": true,
"/fr/modules/system/defaults.css?c": true,
"/fr/modules/system/system.css?c": true,
"/fr/modules/system/system-menus.css?c": true,
"/fr/modules/user/user.css?c": true,
"/fr/sites/all/modules/cck/theme/content-module.css?c": true,
"/fr/sites/all/modules/colorbox/styles/default/colorbox_default_style.css?c": true,
"/fr/sites/all/modules/ctools/css/ctools.css?c": true,
"/fr/sites/all/modules/dhtml_menu/dhtml_menu.css?c": true,
"/fr/sites/all/modules/filefield/filefield.css?c": true,
"/fr/sites/all/modules/fivestar/css/fivestar.css?c": true,
"/fr/sites/all/modules/flickr/flickr.css?c": true,
"/fr/sites/all/modules/gmaps/misc/gmaps.css?c": true,
"/fr/sites/all/modules/lightbox2/css/lightbox.css?c": true,
"/fr/sites/all/modules/logintoboggan/logintoboggan.css?c": true,
"/fr/sites/all/modules/simplenews/simplenews.css?c": true,
"/fr/sites/all/modules/taxonomy_list/taxonomy_list.css?c": true,
"/fr/sites/all/modules/translatablecomments/translatablecomments.css?c": true,
"/fr/sites/all/modules/views/css/views.css?c": true,
"/fr/sites/all/modules/taxonomy_image/taxonomy_image.css?c": true,
"/fr/modules/openid/openid.css?c": true,
"/fr/sites/all/modules/faceted_search/faceted_search_ui.css?c": true
} } });

What can I do to prevent those errors ?
Must I change something in my configuration ?

Thanks for your help.

Comments

merlinofchaos’s picture

Ahh, this line on line 636 of ctools.module is probably wrong:

<?php
          $css_files
[url($file) . $query_string] = TRUE;
?>

I bet it should be:

<?php
          $css_files
[base_path() . $file . $query_string] = TRUE;
?>

Can you try that?

srobert72’s picture

Status:Active» Reviewed & tested by the community

It's OK now, problem has disapeared with your correction.

Thanks a lot for your support.

merlinofchaos’s picture

Status:Reviewed & tested by the community» Fixed

Committed. Thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.