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.

General Questions /

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

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

File & Images - Class not found


Reply


2 Posts   1091 Views

Avatar
merrick_sd

Community Member, 97 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, 97 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