turning off debug log possible?

Hi.. I just made a site on which I inserted an album loop on a zenpage page and the debug log now shows this everytime the page is called

`
{Sat, 26 Jun 2010 21:14:07 GMT}
Backtrace: Bad gallery in instantiation of album merken
Album->Album called
from eval (_zenpage_template_functions.php(16) : eval()'d code [4])
from printCodeblock (_zenpage_template_functions.php [16])
from include (pages.php [69])
from index.php [116]
`
the page itself works great though so I was just thinking on turning the debug log off before handing over the site to the client in case its starts filling up his webspace...

or is it in the code I used?

this is the code I used on the page by inserting it in the codeblock:
(you can see it working here: http://www.denfbv.nl/pages/onze merken)

`
"
<?php
$_zp_current_album = new Album($galleryobject,"merken");
$subalbums = $_zp_current_album->getAlbums();
foreach ($subalbums as $subalbum) {
$subalbumobj = new Album($_zp_gallery,$subalbum);
zenpageAlbumImage($subalbumobj->getFolder(),null,130)
} ?>



<?php
$_zp_current_album = new Album($galleryobject,"merken");
$subalbums = $_zp_current_album->getAlbums();
foreach ($subalbums as $subalbum) {
$subalbumobj = new Album($_zp_gallery,$subalbum);?>

getAlbumLink() ;?>"><?php echo $subalbumobj->getTitle();?>
<?php } ?>

`

Comments

  • Where does `$galleryobject` come from? You might have better luck using the global `$_zp_gallery` instead which stores the main gallery instance. That might be your problem.

    Edit: FYI, I edited your post to enclose the code in backticks. It was breaking the page a bit. ;)
  • Interesting that the "page works" as the error (which is deliberately always on) shows that there was an improper album instantiation. This can (and usually) does cause downstream problem as the gallery instance is stored with the album and used numerous places in Zenphoto.

    So, presumably $galleryobject has not been setup (correctly.)
  • fixed

    `
    <?php $galleryobject = new Gallery();
    $_zp_current_album = new Album($galleryobject ,"merken");
    $subalbums = $_zp_current_album->getAlbums();
    foreach ($subalbums as $subalbum) {
    $subalbumobj = new Album($galleryobject,$subalbum);
    ?>
    `
    thanks!
Sign In or Register to comment.