Theme Style.css Error

g.philippot - July 7, 2006 - 00:06
Project:TinyMCE
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello,

I am Testing TinyMCE on a site including these modules :
adminblock, advanced_menu, authorship, comment, contact, forum, help, locale, menu, page, poll, profile, statistics, taxonomy, and upload.

After instaling TinyMCE, I started to get the following error (3 times) in the administer/settings menu.

# warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/style.css) is not within the allowed path(s): (F:/Web Site/resonance/philippot-huang.com) in F:\Web Site\Resonance\philippot-huang.com\modules\tinymce\tinymce.module on line 604.

After a full debug with backtrace

# theme.inc->theme_get_function.$theme = bluemarine
# theme.inc->theme_get_function.$theme = bluemarine
# theme.inc->theme_get_function.$theme = bluemarine
# theme.inc->theme_get_function.$theme = bluemarine
# theme.inc->theme_get_function.$theme = bluemarine
# theme.inc->path_to_theme.$theme = bluemarine
# theme.inc->path_to_theme.$theme = bluemarine
# theme.inc->path_to_theme.$theme = bluemarine
# theme.inc->theme_get_function.$theme = bluemarine
# index.php.$theme =
# Operating in off-line mode.
# menu.inc->menu_execute_active_handler.$theme =
# system.module->system_settings_form.$theme =
# form.inc->form_builder.$theme =
# tinymce.module->tinymce_config.$theme =
# theme.inc->path_to_theme.$theme = Undefined
# ERROR
# tinymce.module->tinymce_config.$themepath = /
# form.inc->form_builder.$theme =
# tinymce.module->tinymce_config.$theme =
# theme.inc->path_to_theme.$theme = Undefined
# ERROR
# tinymce.module->tinymce_config.$themepath = /
# form.inc->form_builder.$theme =
# form.inc->form_builder.$theme =
# form.inc->form_builder.$theme =
# form.inc->form_builder.$theme =
# form.inc->form_builder.$theme =
# form.inc->form_builder.$theme =
# tinymce.module->tinymce_config.$theme =
# theme.inc->path_to_theme.$theme = Undefined
# ERROR
# tinymce.module->tinymce_config.$themepath = /
# theme.inc->theme_get_function.$theme =
# theme.inc->init_theme.$theme =
# init_theme.theme-1 : bluemarine
# init_theme.theme-2 : bluemarine
# theme.inc->theme_get_function.$theme = bluemarine

I noticed that the global variable $theme is erased during the

    require_once './includes/bootstrap.inc';
    drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

part of index.php.

To Get it work I updated the theme.inc file as follow :

function path_to_theme() {
  global $theme;

  // Added to allow initialization  if not set.
  if (!isset($theme)) {
    init_theme();
  }

  $themes = list_themes();
  return dirname($themes[$theme]->filename);
}

I am new to drupal and I am not sure it was the good solution but it work.

If there is an official patch please let me know

Thanks

#1

drpratten - August 6, 2006 - 05:47

Same problem with 4.7.3. Solution also worked for me.

#2

Michalic - October 2, 2006 - 16:05

Thanks, it worked for me. (4.7.3)

#3

John McV - October 18, 2006 - 09:41

Hi,
I was having the same problem and found a simple solution. Under administer/settings/tinyMCE/CSS set the editor CSS to "TinyMCE default". I had it set to "use theme CSS" which was causing the problem.
John

#4

Darren Oh - October 24, 2006 - 22:22

Should this issue be a tinymce bug to a Drupal theme system feature request?

 
 

Drupal is a registered trademark of Dries Buytaert.