Problem with "No image to display" with functions.inc.php Problem with "No image to display" with functions.inc.php
 

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

Problem with "No image to display" with functions.inc.php

Started by paquets, May 20, 2010, 01:47:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paquets

Hello,
Hope this is the right place to post this and I hope it can help with the development of CPG 1.5

In 1.5, when I searched a non-existant image, it did not give me the "No image to display" anymore. I know this has been discussed and fixed in this thread: http://forum.coppermine-gallery.net/index.php/topic,63939.0.html

But fort some reason the error message still did not show up. I think I fixed it but I did that by changing a few lines in functions.inc.php that was edited before in revision 6979 from the SVN. Not being a CPG developer nor an experienced programmer, I'm not sure this won't cause other problems, but if it can help development of this great product... here's what I did:

I simply added back in functions.inc.php:
default : // Invalid meta album
cpg_die(ERROR, $lang_errors['non_exist_ap']." - $album", __FILE__, __LINE__);


before:
} // switch
} // function get_pic_data


And
changed:
} elseif (is_numeric($album) || in_array($album, $valid_meta_albums)) {


to:
} else {
And it seems that the search function is working fine and giving the "No image to display" when supposed to.

Αndré

Please describe what you are doing when you expect the error message. And please post a link to your gallery so we can test it on your gallery and on our testbeds.

paquets

With the changes described in the original entry, the error actually does not happen anymore. So I was basically stating the error and describing how I fixed it.

The error happened when I was doing a search on my test site http://adpharm.net/cpg15/search.php

Hope this helps...

Αndré

Your fix breaks other functions (you can find them somewhere in the bugs boards, e.g. http://forum.coppermine-gallery.net/index.php/topic,63977.0.html). That's why I need to know these things and cannot blindly apply your suggestion.

paquets

That's what I figured... Would have been too easy a fix.

Should I repost my error in a new forum thread? I've re-uploaded the latest functions.inc.php from the SVN and it went back to not display "No image to display" when the search results come up empty.

To reproduce this: http://adpharm.net/cpg15/search.php type in: aptamil in the search form

And you can try with a keyword such as Avamys (which gives the proper result)

Thanks!

paquets

In 1.5, when I searched a non-existant image, it does not give me the "No image to display" anymore. I know this has been discussed and fixed in this thread: http://forum.coppermine-gallery.net/index.php/topic,63939.0.html

But for some reason, the error message still does not show up.

To reproduce this: http://adpharm.net/cpg15/search.php type in: aptamil in the search form

And you can try with a keyword such as Avamys (which gives the proper result)

Any idea how to fix this?

Thanks in advance

Joachim Müller

Merged with existing thread. Perform a SVN checkout of the entire package.

paquets