forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: P4ul on September 02, 2005, 11:24:05 am

Title: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 02, 2005, 11:24:05 am
1st, an excellent product, many thanks everyone for making available

Not sure if this is a real problem or not

If i create a virtual album,with keyword, it displays the associated images from other ablums within correctly.
However it does not show the number of files within the virtual album, always 0, so noone tends to look in it.



RH9, Apache2.0.40, PHP 4.3.7 , cgp 1.4.1 + all cvs updates from a couple of days ago

Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tarique Sani on September 02, 2005, 12:37:09 pm
can you please post a link to your gallery...
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 02, 2005, 01:09:12 pm
Sorry, unable to provide link, not externally accessable
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tarique Sani on September 02, 2005, 01:16:01 pm
Heh! in that case all I can say is works fine for me :)

We will wait for someone else to verify that this is indeed a bug....
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 02, 2005, 02:25:31 pm
Thanks, that was a help knowing it should work and i think i've found the problem

I've just tried putting a real pic in the album and get
1 files, last one added on Sep 02, 2005, 2 linked files, 3 files total

But with no real images it says
0 files

Now i understand how it works I can add a dummy to get a count pending a real fix
I'd prefer it to register linked without any real thou
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Aditya Mooley on September 02, 2005, 02:35:48 pm
Quote
I'd prefer it to register linked without any real thou

It is supposed to work and works as advertised. I have "0 files, 2 linked files, 2 files total".
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: artistsinhawaii on September 03, 2005, 09:40:57 am
I believe you have to delete all files and cookies, exit, reenter before it will show the 0 pics + X# of linked files.

There was a similar thread at:  http://forum.coppermine-gallery.net/index.php?topic=20914.0


Dennis



Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Aditya Mooley on September 03, 2005, 10:42:04 am
It works even when there is no file in the album where you want to show the linked picture. I just downloaded CPG 1.4.1 and tested it on my local setup and it is working fine.

The other problem in thread http://forum.coppermine-gallery.net/index.php?topic=20914.0 "not possible to select a thumbnail for the album" is a known issue.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: artistsinhawaii on September 03, 2005, 11:02:30 am
It works even when there is no file in the album where you want to show the linked picture. I just downloaded CPG 1.4.1 and tested it on my local setup and it is working fine.

The other problem in thread http://forum.coppermine-gallery.net/index.php?topic=20914.0 "not possible to select a thumbnail for the album" is a known issue.

Great. But it didn't work for the original poster and it didn't work for me, at least not until I deleted all temporary files and cookies from my browser and refreshed.  So, I suspect that if you had been working on other things for a spell before adding the keywords, you need to clear out the saved temp files in the browser before it shows the 0 files and linked stats.  I had nearly 600 files loaded before linking them  in all sorts of directions, across albums and categories.

I only discovered the 0 files + # links when I ran Opera to confirm the view I was getting in IE.   So I tried to clean out the cache in IE and it all showed up.  

Dennis

Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 03, 2005, 11:16:57 am
I have now found a bit more about this.

if I move the virtual ablum as i call it between different parts of the tree (into different Categories), the linked files appeals for some and not for others. - It's consitant in its behaviour, ie if i move it back i get the same result for that part of the tree.

I haven't as yet found a pattern to this, but will test further and report here

I just tried the suggest about about clearing files, but this did not work for me
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Joachim Müller on September 03, 2005, 11:28:13 am
make sure you have the most recent code from the cvs, and make sure to force-refresh your browser ([Ctrl]+[F5]) every time you test.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 03, 2005, 11:42:45 am
make sure you have the most recent code from the cvs, and make sure to force-refresh your browser ([Ctrl]+[F5]) every time you test.

Yes I have the lastest files from cvs
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: artistsinhawaii on September 03, 2005, 11:47:45 am
make sure you have the most recent code from the cvs, and make sure to force-refresh your browser ([Ctrl]+[F5]) every time you test.


Why didn't I know that!  ([Ctrl]+[F5])    <-- probably fundamental IE but who does keyboard clicks these day.    As we say in Hawaii... this is good stuff!

Might I suggest that this be included in the Docs somewhere?
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Joachim Müller on September 03, 2005, 01:22:53 pm
This is browser-specific, not sure if all browsers do that. Same effect as holding the [Ctrl] key down while clicking on the Refresh-icon in your browser. Browser-caching mechanisms differ greatly, depending on OS, browser and user settings, and I don't think it's actually coppermine-related, but browser-related, so I'm not convinced that this should go into the docs. Glad you find this usefull however.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tranz on September 03, 2005, 04:43:40 pm
On my installation at http://tu2.net/cpg/ you can see two albums where one shows the file count and the other doesn't. I made the album properties the same. I even tried it with both albums using the same keyword and the count didn't change.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tranz on September 03, 2005, 04:50:05 pm
I just checked my local installation and noticed a similar pattern, though it might be a coincidence. The file count only shows for the first album that is keyword-only. The ones that follow all say 0 files.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tranz on September 03, 2005, 04:53:55 pm
If I add one file in the second album, then it will show the correct count. If I remove it again, it will show 0 files although there are linked files.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tranz on September 03, 2005, 04:55:50 pm
If I add a file to the third keyword-only album, it will show the correct count. The second will show 0 files.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 03, 2005, 05:13:37 pm
I feel better knowing it not just me now :-)

To add to the above, I have one virtual album, and as I move the album around it appears to have a similar effect,

0 linked when placed in first sub-category of a parent category
correct number linked when placed in second
0 linked when placed in third

Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tranz on September 04, 2005, 01:57:30 am
I'm glad I'm not the only one, either.

Here's another gallery with the issue: http://cpg-contrib.org/index.php?cat=3

The second row of albums have linked files but the file count is 0. I temporarily moved one of the albums to no category and the count was correct.
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Nibbler on September 04, 2005, 02:27:28 am
Code: [Select]
    $sql = "SELECT a.aid, count( p.pid )  AS pic_count, max( p.pid )  AS last_pid, max( p.ctime )  AS last_upload, a.keyword" .
            " FROM {$CONFIG['TABLE_ALBUMS']} AS a " .
            " LEFT JOIN {$CONFIG['TABLE_PICTURES']} AS p ON a.aid = p.aid AND p.approved =  'YES' ".
            "WHERE a.aid IN $album_set" . "GROUP BY p.aid";

Change that GROUP BY to a.aid instead of p.aid in both places that use the code.

Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: P4ul on September 04, 2005, 02:49:25 am
You're the man  :)

Fixed it for me, i can move my virtual album anywhere in the tree and the linked count is correct , many thanks

that was index.php for anyone who needs the fix
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Tranz on September 04, 2005, 02:57:21 am
Confirmed fixed. Thanks, Nibbler! :)
Title: Re: (1.4.1) Virtual album - image count 0 when displayable images
Post by: Nibbler on September 04, 2005, 03:08:28 am
Thanks. Comitted to index.php 1.86