Fatal error isDynamic drives me nuts

I've been struggling now for over 3 hours to understand what happened with the search on my soon to be announced new website. It's still under development at the moment and I tried to style the search.php file. Everything worked fine. Some minutes later I tried search again and i get the following error:
Fatal error: Call to a member function isDynamic() on a non-object in /customers/trojkolka.net/trojkolka.net/httpd.www/newzen/zp-core/template-functions.php on line 1672

I have no idea what happened or what broke... I use the zenpage plugin but I don't thik that causes the issue. My team is based on the zpfocus theme. You can have a look at my site here: http://trojkolka.net/newzen/page/search/Finland I also copy the code of which i suspect that the error might take place (because from that point it just doesn't show anything anymore on the site)

Here is the code snippit:
`
<?php if (getNumAlbums() > 0) { ?>

<?php echo getNumAlbums(); ?>
<?php echo 'found albums'; ?>


<?php $x=1; while (next_album()): $c++; ?>
ind-item">

" title="<?php echo 'View Album:' ?> <?php echo getBareAlbumTitle();?>"><?php printAlbumTitle(); ?>
<?php printAlbumDate(); ?>



<?php $x++; endwhile; ?>

<?php } ?>
<?php if (getNumImages() > 0) { ?>
<?php if (getOption('use_colorbox_slideshow')) { ?>
<?php $x=0; while (next_image(true)): ?>
=1) ? 'noshow' : 'slideshowlink'; ?>" rel="slideshow" href="<?php echo htmlspecialchars(getFullImageURL());?>" title="<?php echo getBareImageTitle();?>"><?php echo 'Play Slideshow'; ?>
<?php $x++; endwhile; ?>
<?php } ?>

<?php echo getNumImages(); ?> <?php echo 'found images'; ?>


    <?php while (next_image(false)): $c++;?>
    <?php if (isLandscape(true)) { ?>
    ...cut...
    <?php } else { ?>
    ...cut...
    <?php } ?>

    <?php endwhile; ?>

<?php } ?>

<?php printPageListWithNav( '<<','>>',false,'true','page-nav','',true,'5' ); ?>

<?php if ($c == 0) {
echo "<h2>Sorry, no matches. Try refining your search.";
} ?>
`

Comments

  • There have been a few fixes regarding searches in the nightly build. Please try upgrading to the nightly. It should fix this problem.
  • Thanks, update to the Nightly solved that problem. I now just have a different issue with the GetLatestNews() function.
    Warning: get_class() called without object from outside a class in /customers/trojkolka.net/trojkolka.net/httpd.www/zennew/zp-core/zp-extensions/zenpage/zenpage-template-functions.php on line 90
    You can check the error on:
    http://www.trojkolka.net/zennew/

    Error gets fired in following piece of code:
    `
    /**
    * Gets the news type of a news item.
    * "news" for a news article or if using the CombiNews feature
    * "flvmovie" (for flv, mp3 and mp4), "image", "3gpmovie" or "quicktime"
    * *
    * @return string
    */
    function getNewsType() {
    global $_zp_current_zenpage_news;
    $ownerclass = strtolower(get_class($_zp_current_zenpage_news));
    switch($ownerclass) {
    case "video":
    $newstype = "video";
    break;
    case "album":
    $newstype = "album";
    break;
    case "zenpagenews":
    $newstype = "news";
    break;
    default:
    $newstype = 'image';
    break;
    }
    return $newstype;
    }
    `
  • acrylian Administrator, Developer
    Without knowing what you do to get the "latest news" or the "more news" we won't be able to help. Apparently you did not setup the right context and global object variable for news.
  • I installed the nightly build of today as adviced to fix the search bug i was encountering. That bug has been solved. However this nightly build fires this Warning no on the frontpage when I call there printLatestNews()

    `
    <?php if ((function_exists('printLatestNews')) && (getOption('spotlight') == 'latest') ) { ?>

    <?php echo 'Latest News'; ?>

    <?php printLatestNews(2,350); ?>
    <?php } ?>
    <?php if (getOption('spotlight') == 'manual') { ?>
    <?php echo getOption('spotlight_text'); ?>
    <?php } ?>

    <?php echo 'More News'; ?>

    <?php printLatestNews(6,'none','',true,true,325,true); ?>

    `
    I use zenpage and used the theme called zpFocus as my basis for my theme
  • That is not really a warning, you are seeing PHP code on the page. Not sure what would cause this, but maybe a corrupt file.
  • acrylian Administrator, Developer
    That issue will be fixed in tonight's nightly. Was an oversite related to the new the news password protection.
  • awesome thanks =) I will grab a later nightly build when i continue developing
Sign In or Register to comment.