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
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;
}
`
`
<?php if ((function_exists('printLatestNews')) && (getOption('spotlight') == 'latest') ) { ?>
<?php echo 'Latest News'; ?>
<?php printLatestNews(2,350); ?><?php } ?>
<?php if (getOption('spotlight') == 'manual') { ?>
<?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