Issue with displayimage.php when performing search Issue with displayimage.php when performing search
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Issue with displayimage.php when performing search

Started by JeWelz, October 13, 2004, 03:09:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JeWelz

I have been modifying some of the php code (as well as some of the database information like changing the album/category via a direct db update) and I'm wondering if I've broken something because the search option is not working.

I perform a search and all of the proper thumbnails are populated via the thumbnails.php file.  Once I click on one of the thumbnails that came up from the search I get the following message:

No image to display

File: blah blah blah/coppermine/displayimage.php - Line: 621
[/color]

Line 620 and 621:
    if ($pic_count == 0) {
        cpg_die(INFORMATION, $lang_errors['no_img_to_display'], __FILE__, __LINE__);


I tried to find out where $pic_count is populated - I found an occurance of it in functions.inc.php but it doesn't make any sense to me how the functions.inc.php occurance of $pic_count is related to the usage in displayimage.php

In functions.inc.php $pic_count exists in only one place, in the case statement switch($album) where case = random:

$result = db_query("SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $ALBUM_SET");
                $nbEnr = mysql_fetch_array($result);
                $pic_count = $nbEnr[0];
_____________________

Why is $count used in all of the other case statements other than the random one and how might this relate to my issue?  What should I try to fix my problem?  Am I looking at the right stuff? I'm not a very experienced coder and very new to PHP - please let me know what other information I need to provide to obtain assistance in finding my bug.

THANKS!!!
Julie

JeWelz

you could probably delete this post - I am no longer encountering this issue. I believe it was due to manually updating the database.  I changed the album number of photos that were stored in the database as well as their categories.

Thanks!
Julie