I tried re-installing the fckeditor, and I'm still getting this error when I go to a page to try to add content: warning: Invalid argument supplied for foreach() in /home/rinncomp/public_html/drupal/sites/all/modules/fckeditor/fckeditor.module on line 1149. Please help! I don't know how to open the .module file to see what is on line 1149.
Comments
Comment #1
traceelements commentedNevermind, it's working now. I don't know why.
Comment #2
traceelements commentedOkay, I lied. It's still having issues. I should've known it wouldn't go away.
I'm using the Zen theme, with my own custom sub-theme, the most recent version of Zen.
I'm getting this error message when I go to the contact page:
warning: Invalid argument supplied for foreach() in /home/rinncomp/public_html/drupal/sites/all/modules/fckeditor/fckeditor.module on line 1149
This is what is on line 1149:
foreach ($stylesheets as $name => $path) {
It is in this line of code:
// add custom stylesheet if configured
// lets hope it exists but we'll leave that to the site admin
if ($conf['css_mode'] == 'theme') {
$style_css = $themepath .'style.css';
if (!empty($theme_info->stylesheets)) {
$css_files = array();
$editorcss = "\"";
foreach ($base_theme_info as $base) { // Grab stylesheets from base theme
foreach ($base->stylesheets as $type => $stylesheets) {
if ($type != "print") {
foreach ($stylesheets as $name => $path) {
if (file_exists($path)) {
$css_files[$name] = $host . $path;
}
}
}
}
}
Any ideas???
Comment #3
traceelements commentedI tried using other themes and realized it's a problem with the zen theme. this error doesn't come up when I switch to the Garland theme. don't know why, or how to use that information.
Comment #4
katiusha commentedThis is a duplicate of http://drupal.org/node/442680.
I must say that traceelements's comments helped. I realized I am also using a custom theme, placed in /sites/all/themes, that is a subtheme of Bluemarine. It seems that when it tries to load the styles from the base theme it only gets an empty array. I added an empty check before line 1149 and the warning no longer appears, still, I think that this issue is deeper than that. Also, I've noticed that the style file is expected to be style.css, which may not always be true for a custom theme.
The line of code added before line no 1149 is
if (!empty($base_theme_info->stylesheets))
Hope this helps.
Comment #5
traceelements commentedOops, sorry. I didn't realize you had already posted this issue. thanks for the info, Katiusha. I ended up just ditching the zen sub-theme, and creating my own custom theme based off of Garland. I think that there are some issues to be had when dealing with sub-themes, so I think I'm going to stay away from them for now.