Filesets view detail has empty head

Permalink
Using 5.2.2.1 when trying to view or edit a file site the page loads with no information in the <head> tag. (Included and image) So none of the css loads and none of the jquery loads. Firebug doesn't throw any errors until you try and click on something. Haven't edited anything except for a custom front end them. Rest of dashboard all works just fine. Any ideas what the problem could be?

1 Attachment

 
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
Yep,
You just said it... A custom front end theme.
Check your theme carefully.....
Saxafrass replied on at Permalink Reply
EDIT:: Version is actually 5.5.2.1

So it's something on my frontend them causing the <head> tags not to be populated in the dashboard? I thought the dashboard used a different theme entirely.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Try switching to a standard concrete theme to test..
Saxafrass replied on at Permalink Reply
Yeah your right. That fixed it.

Looks like this block of code I added into my header.php file is the culprit. It pulls a random image from a fileset so I can use it as a background. Is there a better (correct) place for me to place this code? Thanks for the quick help by the way.

Loader::model('file_list');
Loader::model('file_set');
$fs = FileSet::getByName('backgrounds');
$fileList = new FileList();
$fileList->filterBySet($fs);
$fileList->filterByType(FileType::T_IMAGE);
$files = $fileList->get(100,0); //limit it to 100 pictures

$size = sizeof($files);
$random = rand(0, $size - 1);
$theFile = $files[$random];

EDIT:: Guess I just needed to make it the last thing I did before closing the </head> tag. All fixed now.