10381 Posts in 2195 Topics by 1711 members
| Go to End | Next > | |
| Author | Topic: | 3664 Views |
-
Re: Gallery: show image details

13 October 2009 at 7:33am
OK I've done as you've said but I still just get an error after the build
I am putting my php files in mysite/code and they are as follows:MyImageGalleryItem.php
<?php
class MyGallery extends ImageGalleryPage
{
protected $itemClass = "MyImageGalleryItem";
}class MyImageGalleryItem extends ImageGalleryItem
{
static $db = array (
'PaintingName' => 'Varchar(100)',
'PaintingDimensions' => 'Varchar(50)',
'Media' => 'Varchar(50)' ,
'Sold' => 'Boolean'
// etc...
);public function getCMSFields_forPopup()
{
$f = parent::getCMSFields_forPopup();
$f->push(new TextField('PaintingName','Name of painting'));
$f->push(new TextField('PaintingDimensions','Dimensions of painting'));
$f->push(new TextField('Media','Media'));
$f->push(new CheckboxField('Sold','This painting is sold'));
return $f;
}
}
?>and MyImageGalleryPage.php
<?php
class MyImageGalleryPage extends ImageGalleryPage {
protected $itemClass = "MyImageGalleryItem";
}class MyImageGalleryPage_Controller extends ImageGallery_Controller {
}
?>Do you see what I'm doing wrong!? its the last feature I need for the site, so your help is fantastic thanks!!
-
Re: Gallery: show image details

13 October 2009 at 7:56am
You don't need this:
class MyGallery extends ImageGalleryPage
{
protected $itemClass = "MyImageGalleryItem";
}If you still get an error, paste in so I can see what it is.
-
Re: Gallery: show image details

13 October 2009 at 8:21am
I removed that, and now after the build I just have a blank site!? no error message...
Even when I view the page source it is entirely blank!?
removing the 2 php files and doing the build again brings it all back. :s -
Re: Gallery: show image details

13 October 2009 at 8:52am
That's a php error. Turn on your PHP error reporting so you can find out what it is.
-
Re: Gallery: show image details

13 October 2009 at 10:56am
OK I've been reading in the docs but don't know exactly how to turn PHP error reporting on...
I looked a my server log and its says this error:
"mysite.co.uk [Mon Oct 12 12:01:18 2009] [error] [client 'ipaddress'] File does not exist: /home/sites/mysite.co.uk/public_html/portfolio, referer: http://www.mysite.co.uk/?flush=1"
portfolio is the name of my theme I don't know if that's relevant...I don't know where to go from here... any help appreciated? Thank you!
-
Re: Gallery: show image details

13 October 2009 at 3:24pm
Depending on your hosting environment, you should be able to do it in your .htaccess file by adding:
php_value display_errors On
-
Re: Gallery: show image details

13 October 2009 at 10:44pm
OK I've put
php_value display_errors On
in my ".htaccess" file
and
Director::set_environment_type("dev");
Debug::send_errors_to("me@mydomain.co.uk");in "_config.php"
and still just the white screen!?
I read about changing errors to on in the php.ini file but I can't find that....any suggestions?? Thanks!!!
-
Re: Gallery: show image details

14 October 2009 at 2:39am
You could try setting it at runtime in your _config.php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 'On');That's pretty lame that your hosting provider has error reporting turned off. I would talk to them and let them know you're not a mindreader and they need to turn it on.
| 3664 Views | ||
| Go to Top | Next > |

