Jump to:

23581 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » File & Images - Class not found

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

Page: 1
Go to End
Author Topic: 1060 Views
  • merrick_sd
    Avatar
    Community Member
    95 Posts

    File & Images - Class not found Link to this post

    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);
       }
       
    }

    Attached Files
  • merrick_sd
    Avatar
    Community Member
    95 Posts

    Re: File & Images - Class not found Link to this post

    Ignore me

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

    1060 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.