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]   Go Down

Author Topic: random pictures error in categories!!!!!!!!  (Read 4589 times)

0 Members and 1 Guest are viewing this topic.

binba

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rossandrachel.com
random pictures error in categories!!!!!!!!
« on: October 19, 2003, 07:36:49 pm »

I have this problem, I tried 3 times to delete the whole gallery and start fresh, and it keeps on popping up:

I have category 'A', which has a subcategory 'B'. In category 'B' I have 1 album.

When I view category 'A' I see the subcategory as usual, and a list of random pictures. Whenever I click on any random pictureI get an error message.

For example, category A in here: http://www.rossandrachel.com/gallery/index.php?cat=2 . Click on any picture in the random or "last additions" place, and see the error message.

The installation is clean, I didn't add anything except categories A and B, an album and 2 pictures.

ANY IDEAS?????????? HELP ME!!!!!!!!!!!!!

John

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
random pictures error in categories!!!!!!!!
« Reply #1 on: October 19, 2003, 07:54:44 pm »

So you are saying that random pic only works in sub cat?
Logged

binba

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rossandrachel.com
random pictures error in categories!!!!!!!!
« Reply #2 on: October 19, 2003, 08:06:08 pm »

I don't know. It also works on the main gallery page.

but when I have a category who has a subcategory - then it doesn't work.

Anybody knows what happens?? I used debug mode and got the following message:

Code: [Select]
While executing query "SELECT aid from cpg11d_pictures WHERE pid='1' Array LIMIT 1"

mySQL error: You have an error in your SQL syntax near 'Array LIMIT 1' at line 1


I think there's a problem with the variable $ALBUM_SET but I'm not sure. In one place it's used as a global array, in the other as a string.

????

binba

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rossandrachel.com
random pictures error in categories!!!!!!!!
« Reply #3 on: October 19, 2003, 09:15:30 pm »

I think I found the fix, but I still don't understand how no one before me had this problem. What I did is:

In displayimage.php, find

Code: [Select]
$ALBUM_SET[] = $row['aid'];

replace by:

Code: [Select]
$ALBUM_SET_ARRAY[] = $row['aid'];

the error message seems to be gone now, I hope it won't come up somewhere else

binba

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • http://www.rossandrachel.com
random pictures error in categories!!!!!!!!
« Reply #4 on: October 19, 2003, 09:38:48 pm »

continuing the fix:

in displayimage.php, fine:


Code: [Select]
function get_subcat_data($parent, $level)
{
    global $CONFIG, $ALBUM_SET;


replace by:

Code: [Select]
function get_subcat_data($parent, $level)
{
    global $CONFIG, $ALBUM_SET_ARRAY;
[/code]

John

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
random pictures error in categories!!!!!!!!
« Reply #5 on: October 19, 2003, 10:59:39 pm »

This code you posted... I dont see the need to do this with the code?, perhaps you should run 1.2rc2, if instaling for the first time, I had a problem with 1.1 but it went away with the new version.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 14 queries.