Category bug? error?

Found a bug? Tell us!!
Post Reply
Fred
Regular
Posts: 5
Joined: Mon Jul 12, 2004 3:54 am

Category bug? error?

Post by Fred »

Hi there!

I'm currently using Serendipity (0.6.6-CVS) as my news system of my site. You could refer to: http://www.pdauser.cn/news

I found that the categories aren't working. No matter which category I chose, they all appear the same contents, that's to say, the category is broken.

I have modified several PHP files (actually they were just some HTML code related to the page layout). But I am VERY SURE that, I didn't do anything wrong to corrupt the category function.

I used to use version 0.6-pl3, and it's working fine. However, I need to use the newer version as my site is UTF-8, and 0.6-pl3 doesn't support RSS/XML in UTF-8.

Please anyone could help me.

Thanks guys!


Fred
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Category bug? error?

Post by garvinhicking »

Hi Fred!

No, the feature is not broken 'per se'; it works on my blog. The current category system has been reworked quite a bit in CVS (to allow hierachical categories). As you said you've modified files, it's hard for me to tell you if you broke anything.

If you contact me privately (me -at- supergarv -dot- de) and send me a mail with FTP access to your site, I could try to find out what's wrong with your installation. If you don't like that (which I could understand), maybe you can create a 'cvs diff' of your checkout, and make that available. Then I could see and tell you if you modified important parts...

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tthelen
Regular
Posts: 5
Joined: Tue Jul 13, 2004 3:40 pm
Location: Osnabrück
Contact:

Post by tthelen »

I experience the same problem, with an unmodified installation of serendipity v.0.6.6-CVS.

I made two categories: "Allgemeines" and "Lexikon" and have 4 articles, 3 only assigned to Lexikon, one assigned to "Allgemeines" and "Lexikon".

Selecting either "Allgemeines" or "Lexikon" always shows all four articles.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Could you give me the URL of your blog so that I can look at it? A sql dump of your entrycat and categories table may be helpful as well.

Fred's bug has been fixed my calling serendipity_rebuildCategoryTree() once. That should be done by the installer, but not if you update your blog manually...?

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tthelen
Regular
Posts: 5
Joined: Tue Jul 13, 2004 3:40 pm
Location: Osnabrück
Contact:

Post by tthelen »

The URL is:

http://pomona.virtuos.uni-osnabrueck.de/serendipity/

Categories dump is:

INSERT INTO `serendipity_category` VALUES (1, 'Allgemeines', '', 'wofür sonst kein Platz blieb', 0, 0, 0, 0);
INSERT INTO `serendipity_category` VALUES (2, 'Lexikon', '', 'eLearning von A-Z', 0, 0, 0, 0);

Entrycat dump is:

INSERT INTO `serendipity_entrycat` VALUES (1, 2);
INSERT INTO `serendipity_entrycat` VALUES (2, 2);
INSERT INTO `serendipity_entrycat` VALUES (3, 2);
INSERT INTO `serendipity_entrycat` VALUES (4, 1);
INSERT INTO `serendipity_entrycat` VALUES (4, 2);

There was no manual update as it is an absolutely fresh installation, now about 9 hours old...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You seem to be facing the same bug as fred. I justed updated CVS to let it rebuild the categoryTree anytime. We put that function out a few days before to only rebuild the tree on certain actions, but apparently that didn't cover everything.

Please open your serendipity_entries.php and insert the line 'serendipity_rebuildCategoryTree();' somewhere at the end of the file, so that s9y will rebuild your tree. Then everything should work as expected as a quick fix.

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tthelen
Regular
Posts: 5
Joined: Tue Jul 13, 2004 3:40 pm
Location: Osnabrück
Contact:

Post by tthelen »

Unfortunately this has no immediate effect. I put the function call in different places in serendipity_entries.php, but nothing happend. Now it sits in line 121. Do I have to restart or may be clean up anything?

Or should I replace some files with current CVS versions?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hm, no, you shouldn't really be using new files. the rebuildCategory() just needs to be called once to generate the right category listings. Can you see if your serendipity_categories table has changed? The last dump you send, with all the zeros at the end of the dump, they were wrong. This should be corrected by the rebuild-Function...

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tthelen
Regular
Posts: 5
Joined: Tue Jul 13, 2004 3:40 pm
Location: Osnabrück
Contact:

Post by tthelen »

Hmm, no they didn't change... I must have made some strange mistake, but that doesn't matter: I did a brand new installation from the current CVS tree and entered new toy data - everything works ok now...
Post Reply