Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

File & Images - Class not found


Go to End


2 Posts   1471 Views

Avatar
merrick_sd

Community Member, 99 Posts

9 March 2010 at 4:28am

Fatal error: Class 'Top_Image' not found in /home/testdcs/public_html/sapphire/filesystem/Folder.php on line 70

I have added a class to resize my images into page.php for image banners on my site

works fine

but no i suddenly cannot use the tnymce content box to add images or access the main menu in the CMS called "Files & Images"

I get an error

Fatal error: Class 'Top_Image' not found in /home/testdcs/public_html/sapphire/filesystem/Folder.php on line 70

does anyone have any ideas

short extract from mysite/page.php

class Top_Image extends Image {
static $db = null;

function generateLargeImage($gd) {
$gd->setQuality(100);
return $gd->ResizeRatio(847,153);
}

}

Avatar
merrick_sd

Community Member, 99 Posts

10 March 2010 at 2:25am

Ignore me

I needed to ensure my 'Top_Image' class was in a php page with same name as my class eg: Top.php