[Invalid]: show albums error [Invalid]: show albums error
 

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]

Main Menu

[Invalid]: show albums error

Started by boostdebugger, October 15, 2010, 06:41:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

boostdebugger

user id: 2
bridge enable: NO

1) login as userid 2
2) create ablums
3) click my ablums, ref http://localhost/cpg15x/index.php?cat=10002
4) it show 0 pictures

print the sql statement:
$query = SELECT a.aid, count( p.pid ) AS pic_count, max( p.pid ) AS last_pid, max( p.ctime ) AS last_upload, a.keyword, a.alb_hits FROM cpg15x_albums AS a LEFT JOIN cpg15x_pictures AS p ON a.aid = p.aid AND p.approved = 'YES' WHERE a.category = 10002 GROUP BY a.aid ORDER BY a.pos, a.aid LIMIT 0,1

the key is: WHERE a.category = 10002, in fact it's category is 2
so, there is no result where execute this sql.

3ks

boostdebugger

Quote from: boostdebugger on October 15, 2010, 06:41:10 AM
user id: 2
bridge enable: NO
version:1.5.8

1) login as userid 2
2) create ablums
3) click my ablums, ref http://localhost/cpg15x/index.php?cat=10002
4) it show 0 pictures

print the sql statement:
$query = SELECT a.aid, count( p.pid ) AS pic_count, max( p.pid ) AS last_pid, max( p.ctime ) AS last_upload, a.keyword, a.alb_hits FROM cpg15x_albums AS a LEFT JOIN cpg15x_pictures AS p ON a.aid = p.aid AND p.approved = 'YES' WHERE a.category = 10002 GROUP BY a.aid ORDER BY a.pos, a.aid LIMIT 0,1

the key is: WHERE a.category = 10002, in fact it's category is 2
so, there is no result where execute this sql.

3ks

Αndré

Quote from: boostdebugger on October 15, 2010, 06:41:10 AM
the key is: WHERE a.category = 10002, in fact it's category is 2
No. The user category is always 10000 + USER_ID, in your case 10002.

If you just create albums but don't upload any files, why should it display anything other than '0 pictures'?

Marking accordingly.

boostdebugger

3ks for ur help
i have upload some pictures on it.
it show 0 pictres, but u can see them if click in.

but i open the database table, it shows category is 2.
what's wrong with me?

Αndré

Quote from: boostdebugger on October 15, 2010, 06:41:10 AM
2) create ablums
Where exactly (in which category) do you create these albums? If you create them in your personal gallery, the category ID will be 10002. If you create them in a public category, the category ID will be the ID of that category.

boostdebugger

yes, the personal ablum shows 0 pictures?
is it right?? or by design?

3ks

Αndré

Please answer my question:
Quote from: Αndré on October 15, 2010, 11:25:29 AM
Where exactly (in which category) do you create these albums?


Moving from bugs board to support board.

boostdebugger

i created these albums when i selected the *我的展厅*,
the lang key is: $lang_albmgr_php['my_gallery'] = '* 我的展厅 *'
page: \albmgr.php
version: 1.5.8
download date: yesterday
lang: chinese_gb
install lang: chinese_gb

Αndré

Works for me as expected in my test gallery.

1. created album in '* My Gallery *'
2. uploaded picture to album
3. picture is visible in album (see attached screenshot)

Check your settings. Maybe you have enabled admin approval or something similar. As you don't give any information it's hard to help you.

boostdebugger

the user gallery shows numbers
but others category shows aways ZERO


admin approval option is be closed.

Αndré

Sorry, but I cannot work with your meaningless pictures and descriptions. Maybe someone else knows what you're talking about and what your actual problem is.

First you say your user gallery shows always '0 pictures'. Now you say that the picture count is correct for user galleries.

I'm out of this thread.

boostdebugger

i am sorry for my poor english.
thank you for ur help.
good day~