Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: Problem with Category Random Images and Latest Images  (Read 19297 times)

0 Members and 1 Guest are viewing this topic.

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Problem with Category Random Images and Latest Images
« on: May 25, 2006, 12:01:37 am »

When you click a category, there are spaces for random images from that category and the latest additions to that category and its subcategories.  Scroll to the latest additions.  The pictures appearing there are not just for the category but for the whole gallery itself.

second thing is the random pictures in a category.  Some pictures are also lost and when you click a thumbnail, it doesn't take you to its picture page but to an error page.  The error it gave out was:

Quote
The selected album/file does not exist !

File: /home/melissa/public_html/displayimage.php - Line: 266

Test Account:

Username: test
password: cattle
« Last Edit: June 04, 2006, 11:26:13 pm by Paver »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem with Category Random Images and Latest Images
« Reply #1 on: May 25, 2006, 07:16:05 am »

A test user account is much more helpful if it goes with a link to the page in question ::)
Preferably, a deep link to the page that shows the error message.
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Problem with Category Random Images and Latest Images
« Reply #2 on: May 25, 2006, 07:34:18 am »

http://avril-images.net/index.php?cat=2

Click any of the random pictures at the bottom.  It'll take you to the error specified above.

And the pictures in the latest additions, which should feature only pictures from the category, features the latest features for the whole gallery.  click one and you'll see they don't belong to appearances at all

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem with Category Random Images and Latest Images
« Reply #3 on: May 25, 2006, 08:14:29 am »

do you have any mods applied?
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Problem with Category Random Images and Latest Images
« Reply #4 on: May 25, 2006, 08:33:30 am »

Nope, just the basic 1.4.6 install

reficul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem with Category Random Images and Latest Images
« Reply #5 on: May 25, 2006, 07:29:56 pm »

Quote
In category and its subcategories.  Scroll to the latest additions.  The pictures appearing there are not just for the category but for the whole gallery itself.

I've this problem too... after I upgrade from 1.4.1 to 1.4.6

My link
http://gallery.lamoneta.it/
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Problem with Category Random Images and Latest Images
« Reply #6 on: May 26, 2006, 01:49:38 am »

Your forum works fine now.  :) What did you do?

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Problem with Category Random Images and Latest Images
« Reply #7 on: May 26, 2006, 02:14:57 am »

@wacky_lokpo: You have debug_info visible which is helpful, and I can see that at the end of that debug_info that the $META_ALBUM_SET is empty.  That's the problem.  Why it's not set is not immediately clear to me.   I've seen this happen on my testbed once but I forget why and right now, I cannot replicate the problem (i.e. it's working fine).  I believe it happened when I was developing a plugin that messed with $META_ALBUM_SET so that would be "normal" (while I'm messing with things).

Do you have any plugins installed?

@reficul: I see on your site the same problem.  Do you have any mods or plugins installed?  Check your debug_info, at the end, see what's shown for "META SET".
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Problem with Category Random Images and Latest Images
« Reply #8 on: May 26, 2006, 03:07:51 am »

No plugins are installed.  It's just a simple install :)

reficul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem with Category Random Images and Latest Images
« Reply #9 on: May 26, 2006, 06:22:34 pm »

In debug meta set are empty

Quote
Album set : AND aid IN (63,13,16,23,93,94,212,304,339,340,341,342,343,344,345) ; Meta set: ;
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Problem with Category Random Images and Latest Images
« Reply #10 on: May 26, 2006, 06:42:02 pm »

So the problem is clearly that $META_ALBUM_SET is empty for both your sites.  This variable is used by those 2 blocks to filter out the albums in the current category.  It should be set for the albums in the current category.

@wacky_lokpo & @reficul:
If you have no mods or plugins installed, the only other thing I can suggest is your theme.php.  But I just tried ?theme=classic on both your sites and the problem still exists.  So that's not it.

I noticed when wacky_lokpo had the debug_info on that wacky_lokpo is coming from an upgrade from 1.3. 
@reficul: Are you coming from an upgrade as well?  I have no idea why that would matter, but might as well ask to try to find the commonality between your two sites.

I guess there must be a setting on the config panel that you both have different from my testbed config panel that somehow affects $META_ALBUM_SET. 

I don't have anything else to suggest right now.  Maybe another supporter will think of something.  I'll look into it some more when I have time.
Logged

reficul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem with Category Random Images and Latest Images
« Reply #11 on: May 26, 2006, 09:32:49 pm »

Quote
@reficul: Are you coming from an upgrade as well? 

yes from 1.4.1 to 1.4.6
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Problem with Category Random Images and Latest Images
« Reply #12 on: May 26, 2006, 09:38:52 pm »

Aha!  This doesn't help you, but I have found where I saw the empty $META_ALBUM_SET problem - in my testbed for Coppermine 1.5 (the devel branch on Subversion).  I have no plugins installed but I might have some mods I'm working on.  I'll check it out - it may be related, but I cannot see how since my 1.4.6 testbed is working fine.

If either of you wants a quick band-aid, I could look into a theme or plugin quick-fix.
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Problem with Category Random Images and Latest Images
« Reply #13 on: May 27, 2006, 12:37:39 am »

Please! We would really appreciate it  ;D

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Problem with Category Random Images and Latest Images
« Reply #14 on: May 27, 2006, 12:47:11 am »

moving to bugs board.
Logged

reficul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem with Category Random Images and Latest Images
« Reply #15 on: May 27, 2006, 09:22:25 am »

thx Paver, what u need for a quick band-id? :)
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Problem with Category Random Images and Latest Images
« Reply #16 on: May 27, 2006, 12:53:16 pm »

Never mind the band-aid, how about a fix?   :D

I think this will do it.  The difference between my 1.5 testbed and my 1.4 testbed was a config setting "Show private icon to unlogged user".  With this setting set to "Yes", the problem occurs on both testbeds.

Look for this line in functions.inc.php in the function get_meta_album_set($cat, &$meta_album_set):
Code: [Select]
if ($cpg_show_private_album || $USER_DATA['can_see_all_albums'] && $cat == 0) {

Add in an extra set of parentheses as shown:
Code: [Select]
INCORRECT CODE REMOVED
Correct Code:
Remove $cpg_show_private_album as shown:
Code: [Select]
if ($USER_DATA['can_see_all_albums'] && $cat == 0) {

And that should fix the bug, which it is.

edit: Code above changed due to the original fix being incorrect.  Please apply the correct fix to avoid this bug: http://forum.coppermine-gallery.net/index.php?topic=32091.0
« Last Edit: June 04, 2006, 10:28:43 pm by Paver »
Logged

Flaunt

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • http://flaunt.nu
Re: Problem with Category Random Images and Latest Images
« Reply #17 on: May 27, 2006, 01:20:00 pm »

It worked! :)  The 2 errors are now absent :)  Thanks, Paver!

reficul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Problem with Category Random Images and Latest Images
« Reply #18 on: May 28, 2006, 09:43:55 am »

Thx paver. The fix work!
:)
Logged

Sponge

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Problem with Category Random Images and Latest Images
« Reply #19 on: May 29, 2006, 03:01:45 pm »

I just wanted to say thank you for the fix too.

Everything seemed to be working fine until yesterday when I started getting the same error selecting random photographs from the random files catalogue. A bit of time spent using the search button brought me here. It now seems to be fixed.

So, thank you.

PS I love the software!  :D
Logged
Pages: [1] 2   Go Up
 

Page created in 0.029 seconds with 18 queries.