forum.coppermine-gallery.net

Support => Older/other versions => cpg1.3.x Support => Topic started by: johnwr on June 11, 2004, 12:59:48 am

Title: Most viewed section doesn't include certain categories
Post by: johnwr on June 11, 2004, 12:59:48 am
As far as I can get the most viewed section on the startpage (index.php) should include all pictures available in the gallery. (As long as they're in visible albums of course)

That function on my site ...

http://fotoalbum.serveftp.net/index.php?lang=english

... does not include pictures from the category I have called "Feriebilder".

However if I go into that category (or any other) this works well.

That category doesn't have any albums attached, only subcategories (with albums), and I guess that has something to do with it?

I'm quite certain this is the case for the Random files section as well

John
Title: Re: Most viewed section doesn't include certain categories
Post by: johnwr on June 11, 2004, 07:57:17 pm
Hi

I have done some research on this:

I created a testalbum in the category without any albums (as mentioned in last post). No effect, the pictures still not present in the random or topn sections.

Then I enabled debugmode, and saw as I already knew that the categories were not parsed.
At the bottom of this post is included the queries referenced below from the request of the HOMEpage:
(http://fotoalbum.serveftp.net/index.php)

Query[12] returns the category in question (category=6)
Query[13] returns nothing as there are no albums there
Query[14] returns 0 (of course as there still is no albums...)
Query[16] returns the useralbums, which means it never parsed the subcategories in the category in question (category = 6)
Query[18-22] Then it continues to the other "root"categories (10 & 11)
Query[23] The field 'category' in the table cpg11d_albums is an int(11) in the database, but in this query it's a string? Why is this?

Hopefully this can lead some of you developers on track of this problem.
I have only researched this in the database, as I unfortunately don't know PHP.

I am quite positive that this problem occured after I updated all files from CVS, and ran update.php. on this Tuesday
The previous time I did this was two weeks ago.

John

==========================
Queries:
------------------
Array
(
   
Title: Re: Most viewed section doesn't include certain categories
Post by: johnwr on June 17, 2004, 01:19:25 am
Am I really the only one with this problem?

The index.php page won't include all categories for the random and topn sections, while all other pages behave correctly.

As I only discovered today, this leads to the situation that when a user click on e.g. the apparently most viewed pic, he/she gets the real most viewed picture, since this is the displayimage.php. That would be good, but for the fact that it wasn't the picture the user requested in the first place...

John
Title: Re: Most viewed section doesn't include certain categories
Post by: rrosalion on June 28, 2004, 06:19:56 am
John, I'm not sure what was happening with my site when you checked - but I was experiencing some problems earlier today.

It seems to be all working again, so feel free to check it out (I temporarily got rid of the "topn" and "toprated" sections cause of the bug, but I've put them back so you can see what's going on)

Is anyone working on this problem? Have other people experienced the same issue??
Title: Re: Most viewed section doesn't include certain categories
Post by: Joachim Müller on June 28, 2004, 08:20:23 am
I'm not able to replicate this behaviour, if have no clue where to start looking for.

GauGau
Title: Re: Most viewed section doesn't include certain categories
Post by: rrosalion on June 29, 2004, 06:09:57 am
I'm not able to replicate this behaviour, if have no clue where to start looking for.

GauGau

visit http://www.sobriquet.net/gallery/, and click on ANY of the thumbnails in "most viewed", or "top rated", and they link to different images (i.e. not the image shown)

if you visit:
http://www.sobriquet.net/gallery/thumbnails.php?album=topn&cat=0
or
http://www.sobriquet.net/gallery/thumbnails.php?album=toprated&cat=0
the thumnails and links work fine, so the issue is only with the index.php page.

from what i can gather, the LINKS on index.php are correct, but the THUMBNAILS and details are not
Title: Re: Most viewed section doesn't include certain categories
Post by: Tarique Sani on June 29, 2004, 07:32:24 am
OK, I think John is right - Sub categories are not getting included in the "Most Viewed" and "Top Rated" on the index page - now to see if this happens only if the Category has only Sub Categories but no Albums...

[update]
This bug seems to have been fixed in the CVS  - Try with the attached index.php (rename it before using to index.php)  Let us know what happens
[/update]

[attachment deleted by admin]
Title: Re: Most viewed section doesn't include certain categories
Post by: johnwr on June 30, 2004, 08:28:40 pm
Hi Tarique Sani,

I've installed your included index file, but no change for me.

The Most Viewed section of

    http://fotoalbum.serveftp.net/

still don't show the right files (though they link to the right ones as usual).
The random function still only includes the useralbums as well.

Let me know if you need some debug info from my site.

John
Title: Re: Most viewed section doesn't include certain categories
Post by: Tarique Sani on July 01, 2004, 05:41:51 am
Since none of us are able to replicate this behaviour I assume that there is something wrong with the data in your tables - unless we can see the data in your table we willl not be able to help you.

You can PM me with needed information for phpMyAdmin if you have it installed
Title: Re: Most viewed section doesn't include certain categories
Post by: johnwr on July 01, 2004, 02:25:22 pm
I didn't have phpMyAdmin installed, but I have now, and I have sent you the info.
Hopefully you can identify the error, and keep it from occuring to others. As mentioned earlier in this thread I first noticed this error after running update.php 2004-06-11, with the then current CVS code.

John
Title: Re: Most viewed section doesn't include certain categories
Post by: johnwr on July 05, 2004, 04:23:57 pm
This is fixed. Fix posted in this thread:

http://forum.coppermine-gallery.net/index.php?topic=7315.0

John