Hi silverstripers,
<br >
<br >In my Projectpage.php file i have the following code;
<br >
<br >static $has_one = array(
<br > 'Photo1' => 'ProjectImage',
<br > 'Photo2' => 'ProjectImage',
<br > 'Photo3' => 'ProjectImage',
<br > 'Photo4' => 'ProjectImage'
<br >);
<br >
<br >
<br >class ProjectImage extends Image {
<br >
<br >
<br > function generateSmallimage($gd) {
<br > return $gd->croppedResize(60,60);
<br > }
<br >
<br > function generateLarger($gd) {
<br > return $gd->resizeByWidth(420);
<br > }
<br >
<br > function generateLargest($gd) {
<br > return $gd->resizeByWidth(800);
<br > }
<br >
<br >}
<br >
<br >The ProjectImage class is used to upload the image in different sizes.
<br >Now the problem is when i want to go to the Files & Image section i get an error like;
<br >Fatal error: Class 'ProjectImage' not found in C:\xampp\htdocs\bvlb\sapphire\filesystem\Folder.php on line 104
<br >
<br >I understand that there is a problem with the class name. Now my question is, how can i fix this ? :)
<br >
<br >cheerz,
<br >
<br >Joe
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.
yikes, formatting fail.
Is ProjectImage in it's own php file? It should be called ProjectImage.php. At the moment, it looks like it is part of Projectpage.php, but it isn't clear because of all those break tags :D