forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: davieb on November 17, 2007, 05:31:22 pm

Title: Getting "The selected album/file does not exist !" error
Post by: davieb on November 17, 2007, 05:31:22 pm
Hi Just from today everyone on my gallery is getting the above message. The only change that has been made recently is the installation of the Stramm modpack. Have searched through the forum and the only instances I can find end up with neither user following the instructions so I hope I've done this right.

I've enabled the debug info and the full message I get when uploading a file is

The selected album/file does not exist !

File: /home/content/d/a/v/davieb/html/epv3/coppermine/include/functions.inc.php - Line: 1363


Gallery is bridged so need to access via www.davidbrennan.co.uk/epv3/simplemachinesforum

User - test2
Password - camera500
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Joachim Müller on November 17, 2007, 05:38:30 pm
Actual Gallery URL is http://davidbrennan.co.uk/epv3/coppermine/
Don't post the forum URL - supporters will be sent their automatically when clicking login.

I'm sure that I have seen this error before. Doesn't happen using an unmodified coppermine afaik. Maybe a modpack issue (not sure).
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 17, 2007, 06:19:07 pm
I'm sure that I have seen this error before. Doesn't happen using an unmodified coppermine afaik. Maybe a modpack issue (not sure).

You possibly have. Like I said earlier on there are 2 instances of this when I used the search but neither had been answered as they hadn't followed the instructions you had set for support queries.

Do you want me to open this in the board for the modpack instead?
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Joachim Müller on November 17, 2007, 06:56:04 pm
Let's wait if Stramm has something to say on this.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 17, 2007, 08:11:32 pm
Don't know if this is related or not but I just got another error when placing a comment

The selected album/file does not exist !

File: /home/content/d/a/v/davieb/html/epv3/coppermine/db_input.php - Line: 125

It was quite a long comment mind you. A shorter one went on no problem
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 10:24:17 am
Done a little bit more investigating one a 2nd install of coppermine and this error doesn't appear until the modpack is installed. Once it's in then the error starts.
Strangely enough I can stop it by setting the URI upload boxes to 1 or more. Files added go straight in then without the error. Only problem then is the screen that you add all the data to (title, desctription etc) gets stretched so you end up with massive gaps and scroll bars everywhere.

Hope this extra stuff helps to find a solution
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 11:17:31 am
Blimey finding more problems now. Screens are being stretched all over the place and getting blank screens when clicking on thumbnails.

I think I'll just return to the backed up version prior to installing the modpack
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 11:58:16 am
The stretched look of your sites isn't a problem at all. It's how IE renders the debug box. The other issue I'll have a look at. May need a few cause I do not use SMF, will need to install it again. 
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 11:59:45 am
login doesn't work
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 12:17:09 pm
Sorry about that, was doing some work so had the bridge disabled.

Login should be ok now
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 12:41:34 pm
k, have seen what you mean. Pictures get added to the pictures table but the mentioned error message appeares nevertheless. However I can't see any issues when commenting.

Will try to replicate that behaviour on my local install with an uptodate SMF.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 12:47:29 pm
Thanks Stramm

I think the commenting thing may have just been a glitch to be honest. It worked ok when I put the second comment in
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 04:24:01 pm
I couldn't replicate your issues on my local install (win and nix[Suse] CPG 1.4.14, AMF 1.1.4). When trying again to upload on your site, it wasn't possible anymore. This time the pictures weren't added to the db as before.
I suspect your additional modifications to be the culprit (You are currently using xx MB (xx%) of your 50 MB of storage.)

It's not possible for me to search for issues if you've modified the code yourself, too.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 04:31:24 pm
So it basically boils down to either having a usage warning showing or having the modpack installed, but not both.

Ah well, back to the drawing board I go. Thought Coppermine was going to be the answer to my problems  :'(

Thanks for your time
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Joachim Müller on November 18, 2007, 05:40:25 pm
Both is possible if done properly. Stramm suggested that you have a flaw in your custom coding. Subsequently, turn it off (by undoing your changes). Check if uploading then works as expected. If true, then your customization is to blame. If this is the case, it's time to look into your customization and make it work properly.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 06:24:45 pm
Only problem there is the only customisation I've done, other than that which is possible via the config menu, is changing the wording in the anycontent.php file (which I've switched back and tried again, still no change). Considering it was working fine until I put the Stramm modpack in it looks like I'll have to go without those extra bits, as knowing how much space members have is more important to them than getting an e-mail about a comment.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 06:29:43 pm
Sorry Stramm - just realised you were testing there when I'd switched of the debug. It's back on again if you are wanting to try something else
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 07:02:36 pm
OK, I finally was able to replicate the problem. This is a modpack issue. Will move the thread therefore to the modpack board.

Till I have a fix you can set the number of file upload boxes > 1 and the issue is gone.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 07:59:04 pm
final fix for that bug:
include/picmgmnt.inc.php.... find
Code: [Select]
    $query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
    $result = cpg_db_query($query);

$time = time();
if ($CONFIG['enable_user_notification']){
$auto_subscribe_post = $cpg_udb->get_auto_subscribe_post($user_id);
if ($auto_subscribe_post['auto_subscribe_post']) {
$result3 = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE ctime='".$time."' AND filename='".addslashes($filename)."'");
    if(list($pid) = mysql_fetch_row($result3)){
cpg_db_query("INSERT INTO {$CONFIG['TABLE_NOTIFY']} (user_id, picture_id) VALUES('".$user_id."' ,'".$pid."')");
}
}
}
replace with
Code: [Select]
$time = time();
if ($CONFIG['enable_user_notification']){
$auto_subscribe_post = $cpg_udb->get_auto_subscribe_post($user_id);
if ($auto_subscribe_post['auto_subscribe_post']) {
$result3 = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE ctime='".$time."' AND filename='".addslashes($filename)."'");
    if(list($pid) = mysql_fetch_row($result3)){
cpg_db_query("INSERT INTO {$CONFIG['TABLE_NOTIFY']} (user_id, picture_id) VALUES('".$user_id."' ,'".$pid."')");
}
}
}

    $query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
    $result = cpg_db_query($query);

so you just have to switch the two code blocks
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 08:43:16 pm
Made the change as above.

still get an error, just not the same one. It now shows

"The selected album/file does not exist ! "

Image still goes into the gallery though.
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 09:12:52 pm
for me this works just perfect... I'll attach the fixed picmgmnt.inc.php
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 09:22:10 pm
Sorry, transferred your file in and I get the original error message again  :(

debug is still on if you want to have a look
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Stramm on November 18, 2007, 09:40:29 pm
hmm.. ok, then I'll have to check again... but tomorrow
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 09:49:40 pm
OK thanks again for all your work on this
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 18, 2007, 10:05:46 pm
Been doing a bit more on investigating myself on this and started everything from scratch to see if I could pinpoint what caused the error to appear.

So I did a fresh install (in a new directory) of coppermine - uploads worked fine
Then installed the Modpack - uploads worked fine
Then made the change to upload.php to show the disc quota - uploads worked fine
Then bridged to SMF - uploads give "The selected album/file does not exist !"  error message
made the change to picmgmnt.inc.php as shown earlier - still get the error message

Hope that helps some
Title: Re: Getting "The selected album/file does not exist !" error
Post by: Nibbler on November 18, 2007, 10:11:16 pm
Try http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.4.x/db_input.php?r1=3338&r2=3364
Title: Re: Getting "The selected album/file does not exist !" error
Post by: davieb on November 19, 2007, 04:05:02 pm
Success, that works. No more error messages and both the Modpack and quota level both working alongside each other.

Thanks Stramm and Nibbler, between the two of you the gallery for the site is now working just as we want it