page not found 03/14/2011 - 17:43 sites/all/themes/sky/Array

shows in status report as a warning.

Should I be concerned?

Comments

Jeff Burnz’s picture

Component: User interface » Code
Category: support » bug

Anything else with that report or is that the only message? Yes we should be concerned, this is a 404 and we don't want those if they can be avoided.

davidsanger’s picture

Actually it was in the log file (/admin/reports/dblog) not the status report and was indeed a 404 which seemed to come from the appearance settings panel

referrer ../admin/appearance/settings/sky

Jeff Burnz’s picture

The problem is with these lines of code in color.inc

$css = ($theme == 'sky') ? 'color/preview.css' : array();
$js = ($theme == 'sky') ? 'color/preview.js' : array();

I assume this is to do with Colortheme module support, because if that module does not exist those variables are populated with the empty array() and this generates a 404 when called later on in color.inc by color module i.e.:

  'preview_css' => $css,
  'preview_js' => $js,

I have a workaround prepared that checks if Colortheme module exists, but not sure if this is really the right fix, it works but I need to look at this a bit more. You could install the Colortheme module as an alternative, its pretty cool actually - http://drupal.org/project/colortheme.

IMO we probably should be looking at color.module here to see whats going on in there - for example do we have to declare these preview files at all - or can we make them dependent on Colortheme existing? I can't recall right now, but I know some assumptions are hard coded in Color module so I need to check that up.

Jacine’s picture

Hey, it wasn't for Color Theme support actually. It is to prevent the color files from loading if say, Seven is the backend theme (which doesn't happen with Color theme) because the CSS (and probably JS) horribly breaks Seven. All color module does is change the theme on theme settings page that's requested, and makes sure the page doesn't load in the Overlay. The rest is happening in Sky itself.

I didn't notice that it was giving a 404, but just not setting preview_css and preview_js at all of the current theme isn't sky would probably fix the problem. Alternatively, the preview code could could be written to work with the regular preview box (and live in different files). The reason I didn't do that is because there are just too many options for color and it was really hard to apply all the settings. So, that's why I created color theme. :)