Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Martin Wynne on January 04, 2023, 11:59:37 AM

Title: Calendar bug for Jan 2023
Post by: Martin Wynne on January 04, 2023, 11:59:37 AM
Since the New Year, there seems to be a bug in the Calendar.

Changing the month with the arrows causes this box to jump from Dec 22 straight to Mar 23. Jan and Feb 2023 have gone missing:

smf_calendar_issue.png

How do I fix it?

Martin.
Title: Re: Calendar bug for Jan 2023
Post by: Aleksi "Lex" Kilpinen on January 04, 2023, 12:09:27 PM
That's not what is happening here, nor on my own forum. Also, you are not viewing March in that image, you are viewing January with March selected in the quick select menu.

The Arrow right in that view should have an URL like /index.php?action=calendar;viewmonth;year=2023;month=2;day=01
And as you can see, it defines the year, month and day to jump to - In this case month 2, February.
Title: Re: Calendar bug for Jan 2023
Post by: Martin Wynne on January 04, 2023, 12:17:17 PM
Thanks, but I don't follow?

Clicking the left arrow, the contents of that box go:

Dec 22
Nov 22
etc.

then clicking the right arrow, the contents of that box go:

Nov 22
Dec 22
Mar 23  should be Jan 23
Feb 23
Mar 23
Apr 23

Martin.
Title: Re: Calendar bug for Jan 2023
Post by: Aleksi "Lex" Kilpinen on January 04, 2023, 12:21:15 PM
The arrows you have circled in the image should actually skip you to the next (or previous) month completely, and the header (January in your image) should change accordingly. If the only thing changing is what is in that selection box, then something is broken, and it's not only missing months in the calendar.
Title: Re: Calendar bug for Jan 2023
Post by: Martin Wynne on January 04, 2023, 12:36:27 PM
Thanks.

I have done some more testing.

The calendar function is working fine -- except this box, which can never show the word "Jan" for any year. It always shows "Mar" instead whenever it should show "Jan". Clicking it shows the calendar for Jan.

smf_calendar_issue1.png

And the same for the other box. It is incapable of ever showing "Jan" and always shows "Mar" instead.

This looks like a language look-up bug somewhere.

Is there a fix?

Thanks,

Martin.
Title: Re: Calendar bug for Jan 2023
Post by: shawnb61 on January 04, 2023, 05:06:53 PM
What version of SMF are you running?

What do the months look like in Themes/default/languages/index.english.php?

They should look like this:
https://github.com/SimpleMachines/SMF/blob/5fb37db310448a32269480c666979c483b4b650e/Themes/default/languages/index.english.php#L28

Title: Re: Calendar bug for Jan 2023
Post by: Martin Wynne on January 05, 2023, 01:01:26 AM
Hi,

Running 2.1.3

Many thanks. I found the bug. It was actually in

 index.english_british.php

smf_bug.png

Edited to 'Jan' and now working fine.

Thanks again for the URL. :)

Martin.