Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last year missing in the navigation bar of monthly pages #30

Closed
Jterrettaz opened this issue Jul 15, 2022 · 6 comments
Closed

Last year missing in the navigation bar of monthly pages #30

Jterrettaz opened this issue Jul 15, 2022 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@Jterrettaz
Copy link

Hi, there is still a little problem with the year-month list in the navigation bar. When choosing any month, the last year (2022) is not visible anymore in the navigation bar.

@Daveiano Daveiano added the bug Something isn't working label Jul 15, 2022
@Daveiano
Copy link
Owner

Daveiano commented Jul 15, 2022

You are right, I totally overlooked this.

Thank you for reporting!

Follow-up of #24

@Daveiano Daveiano added this to the 1.3.3 milestone Jul 15, 2022
@Daveiano
Copy link
Owner

@Jterrettaz I had a look over this and after removing all old generated output files (especially the archive months eg. month-2021-10.html) and starting a new report run, the year links are appearing in the navigation.

Could you try the same?

If your output folder is /var/www/html/weewx/, this should do the trick:

sudo rm -rf /var/www/html/weewx/month*

@Jterrettaz
Copy link
Author

@Daveiano : When I installed the version 1.3.2, I deleted all the monthly files and they were generated again with the last version.
The problem is that when opening any archive month, the year 2022 is missing in the navigation bar.
See for exemple here : http://meteo-sciez.fr/weewx/wdc/month-2015-05.html. All years except 2022 are appearing in the navigation bar.

@Daveiano
Copy link
Owner

Daveiano commented Jul 20, 2022

@Jterrettaz Wow, that's a lot of data!

Sorry, I got you now! Thanks for sharing the example. I don't have a database that big for testing but I have a gues what the cause could be: Could you please test to replace Line 62 in archive_util.py (located in the user directory, see https://www.weewx.com/docs/usersguide.htm#Where_to_find_things) from

return list(range(first_year, last_year))

to

return list(range(first_year, last_year + 1))

This should fix the problem. Don't forget to remove the month pages from the html folder.

@Jterrettaz
Copy link
Author

It is OK with this modification.

@Daveiano
Copy link
Owner

Thanks for testing this!

I will include this in the upcoming 1.3.3 release, which should be available by the end of the week.

Daveiano added a commit that referenced this issue Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants