Member
Member
trojkolka   2010-04-29, 19:48
#1
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:

Quote: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'; ?>
<div>
<?php $x=1; while (next_album()): $c++; ?>
<div class="<?php echo ($odd=$x%2) ? 'goleft' : 'goright'; ?> ind-item">
<a href="<?php echo htmlspecialchars(getAlbumLinkURL());?>" title="<?php echo 'View Album:' ?> <?php echo getBareAlbumTitle();?>"><?php printAlbumTitle(); ?>
<div class="front-date"><?php printAlbumDate(); ?>

<div class="front-image">
<?php echo getBareAlbumTitle();?>">
<?php printCustomAlbumThumbImage(getBareAlbumTitle(),120); ?>
<?php echo truncate_string(getAlbumDesc(), 200); ?>
<?php echo getBareAlbumTitle();?>">»
</div>
</div>
<?php $x++; endwhile; ?>
</div></div>
<?php } ?>
<?php if (getNumImages() > 0) { ?>
<?php if (getOption('use_colorbox_slideshow')) { ?>
<?php $x=0; while (next_image(true)): ?>
<a class="<?php echo ($x>=1) ? 'noshow' : 'slideshowlink'; ?>" rel="slideshow" href="<?php echo htmlspecialchars(getFullImageURL());?>" title="<?php echo getBareImageTitle();?>"><?php echo 'Play Slideshow'; ?></a>
<?php $x++; endwhile; ?>
<?php } ?>

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

[list]
<?php while (next_image(false)): $c++;?>
<?php if (isLandscape(true)) { ?>
...cut...
<?php } else { ?>
...cut...
<?php } ?>
</li>
<?php endwhile; ?>
[/list]

<?php } ?>

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

<?php if ($c == 0) {
echo "Sorry, no matches. Try refining your search.";
} ?>
`
Member
Member
kagutsuchi   2010-04-29, 20:53
#2
There have been a few fixes regarding searches in the nightly build. Please try upgrading to the nightly. It should fix this problem.
Member
Member
trojkolka   2010-05-04, 10:57
#3
Thanks, update to the Nightly solved that problem. I now just have a different issue with the GetLatestNews() function.

Quote: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;
}
`
Administrator
Administrator
acrylian   2010-05-04, 11:38
#4
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.
Member
Member
trojkolka   2010-05-04, 14:36
#5
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
Member
Member
sbillard   2010-05-04, 16:59
#6
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.
Administrator
Administrator
acrylian   2010-05-04, 17:18
#7
That issue will be fixed in tonight's nightly. Was an oversite related to the new the news password protection.
Member
Member
trojkolka   2010-05-04, 19:39
#8
awesome thanks =) I will grab a later nightly build when i continue developing
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.