Advanced 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

Pages: [1]   Go Down

Author Topic: Problem with "No image to display" with functions.inc.php  (Read 4612 times)

0 Members and 1 Guest are viewing this topic.

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Problem with "No image to display" with functions.inc.php
« on: May 20, 2010, 01:47:15 pm »

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:
Code: [Select]
default : // Invalid meta album
cpg_die(ERROR, $lang_errors['non_exist_ap']." - $album", __FILE__, __LINE__);

before:
Code: [Select]
} // switch
} // function get_pic_data

And
changed:
Code: [Select]
} elseif (is_numeric($album) || in_array($album, $valid_meta_albums)) {

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with "No image to display" with functions.inc.php
« Reply #1 on: May 20, 2010, 03:25:49 pm »

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.
Logged

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Problem with "No image to display" with functions.inc.php
« Reply #2 on: May 20, 2010, 03:41:58 pm »

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...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Problem with "No image to display" with functions.inc.php
« Reply #3 on: May 20, 2010, 04:00:19 pm »

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.
Logged

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Problem with "No image to display" with functions.inc.php
« Reply #4 on: May 20, 2010, 04:17:49 pm »

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!
Logged

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
"No image to display" does not show in empty search results
« Reply #5 on: May 20, 2010, 05:13:28 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem with "No image to display" with functions.inc.php
« Reply #6 on: May 20, 2010, 05:18:20 pm »

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

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Problem with "No image to display" with functions.inc.php
« Reply #7 on: May 20, 2010, 05:22:14 pm »

Okay, thank you for the quick reply, I'll do that.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.