Archive Quirk

Creating and modifying plugins.
Post Reply
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Archive Quirk

Post by n2ition »

I have been using s9y successfully for a few weeks now and LOVE it. But I have just encountered a new quirk with the archive plugin. As I have only been blogging since the middle of last month I don't have months & months of archives. Since I didn't want to have months listed that had no entries I changed the number of archive months to show as 1 so that it only showed the current month. Now that March has turned into April I want both months to show up in the sidebar. The problem is when I go to plugin configuration and tell it to show 2 months it shows April 2005 and February 2005. February doesn't have any posts...so if you click on it March's posts are pulled up...but I just want the side bar to show March.

What can I do?

the blog is at www.n2ition.com and I am using s9y .08.4b

Thanks
The good news is the bad news is wrong! Random Kindness Project
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Archive Quirk

Post by garvinhicking »

This is very weird, because it links to '2005/03.html' and the link ready 'February' instead of march.

Are you using the internal "Categories" plugin with Serendipity and did not manually edit the plugin code?

Because it works properly in my blog...

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/
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Post by n2ition »

I don't manually mess with code as I don't have enough PHP knowledge not to screw it up. So what is there is what came with the software when it was downloaded.

I should mention that until a couple of days ago March showed up just fine. Now even if I put in to show 12 months...it shows April to April and no March at all.
The good news is the bad news is wrong! Random Kindness Project
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Post by n2ition »

What is the file name that dictates what each number represents. ie 03 = March 02 = February, etc.

I can either look at the code or even just reinstall it...but I can't find a plugin folder for Archives. Where should I be looking as I have downloaded several versions of the software to look for an archive plugin but there doesn't seem to be one? :(

Thanks!
The good news is the bad news is wrong! Random Kindness Project
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Post by n2ition »

Okay, I figured as long as a new release was out I would go ahead and upgrade and hopefully that would also solve my problem with the weird date issue. NO LUCK! My upgrade went flawless but the issue of February showing up instead of March in the archives is still there.

Any help would be greatly appreciated.

TIA
The good news is the bad news is wrong! Random Kindness Project
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The "archives" plugin can be found within the file include/plugin_internal.inc.php - but if you said you just upgraded to the latest release, that file should be okay.

The numbers 03, 02, ... are mapped using the date() call.

Is the server time set right on your server? I can only think of a PHP bug or a webserver time bug. I must admit I'm a bit out of clues...so the only thing left I can offer is to have a "debugging" look at your site, but I would need FTP access to yuor serendipity directory then. Contact me privately if you wish to do so.

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/
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Post by n2ition »

Wouldn't a server or PHP bug affect the calendar the same way? "March" is showing up correctly in the calendar...it's just off in the archives. That's the part that has me thrown. I assumed that the same code called up the months.

I'm at a loss too. I'll see if the webserver folks have any suggestions and if I have no luck I'll contact you.

Thanks for all your help Garvin!

Heather
The good news is the bad news is wrong! Random Kindness Project
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Post by n2ition »

hmmmm...I didn't think about this until now. There is one other strange glitch with the Calendar. When you go into plugin configurations it asks what day of the week is consider the beginning of the week. Default is Monday, but if I leave Monday selected, the calendar starts the week on Tuesday and ENDS on Monday. I want my calendars weeks to start with Sunday so I have to set the plugin to start the week on Saturday to get it to appear correctly.

I don't know if this issue may also be effecting the archive but figure it can't hurt to let you know about.

I got word back from my webhost and the suggestion they made was "check your MySQL Database Table Relationships, could be an issue there." They are saying it is definitely not a server or PHP issue so therefore must be an issue with the code.

Thanks again for any help or suggestions.
The good news is the bad news is wrong! Random Kindness Project
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

This is a strange issue I also cannot reproduce. I now really think your webserver's time functions are bugged. To actually prove that, I would need FTP access to your machine.

The MySQL database has nothing, absolutely nothing, to do with the timechecks.

Did you set a Server Time Zone Offset in Serendipity configuration? Maybe this could cause trouble, it's the only issue I might think of.

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/
n2ition
Regular
Posts: 58
Joined: Sun Mar 20, 2005 8:43 pm
Location: Dallas, TX
Contact:

Post by n2ition »

You are a GENIUS! The Server Time Zone Offset was causing the problem. As soon as removed the time adjustment (-1) it corrected the problem. It also corrected the issue with the Calendar so that it now shows the starting day of the week as the actual day selected.

I don't know if this is a bug that can be fixed but at least now you folks are aware of it. If you are able to get it fixed post a note here and I'll make sure my files get updated. In the meantime I can manually adjust the times on my posts.

Thanks again for all your help!
The good news is the bad news is wrong! Random Kindness Project
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Great that this was the bug! This in fact helped me to easily debug the error out of the plugin. I've just committed a fix to CVS which will be part of the 0.8 final release coming up in a few days.

Thanks for noticing this bug!

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/
Post Reply