Ok the issue with hasNextImage() and hasPrevImage() popped up again and I know why but not a clue on how to solve it. If I search and click on a result of an album from the search page that takes me directly to the image.php page the "Next" functionality breaks and starts skipping albums. Here is the loop for albums on search.php
```
<?php while (next_album(true)): $c++;?>
<?php $firstimage = $_zp_current_album->getImages(); // get the first image of the current album in the loop?>
<div class="thumb">
<a>" title="<?php echo getAlbumTitle();?>"><?php printCustomAlbumThumbImage(getAlbumTitle(), null, 200, null, 115, 115); ?></a>
<div class="title">
<a>" title="<?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?></a>
[img]<?php echo $_zp_themeroot ?>/images/tag.png[/img]<?php printTags('links', null, 'taglist', ''); ?>
<?php printLinklessRating("album"); ?>
<?php printAlbumDesc(false); ?>
</div>
</div>
<?php if($c%10 == 0) break; ?>
<?php endwhile; ?>
`
and the hasNextImage() on image.php is listed above. I've searched around the forums and have been playing with it for a while but I'm completely stumped. I tried play with set_context(), what it seems to be doing is not realising that it is now within an album . If I click on a thumbnail after arriving from a search page that reloads the image.php page it works fine.
Sorry for the trouble I'm just baffled :(