-
Notifications
You must be signed in to change notification settings - Fork 57
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
Month archives only show a few posts #1
Comments
More specifically, the updater says its updating the month archive but doesn't actually. A wipe of the cache and a full rebuild has fixed it every time for me. The first potential culprit is, I think, engine/update.sh I just haven't had a chance to dig into it yet. |
ok, so update.sh is a wrapper for calling update.php, update.php wraps a call to Updater::update(), since its not useful to post the entirety of the architecture I'll stop there. I'm looking at Updater::post_filenames_in_year_month and how its different from Updater::most_recent_post_filenames because the issue seems to be (at least in my specific test case) that the most recent post isn't making it into the posts array thats passed to the Post::write_index for the archives, when it does for the frontpage. |
the difference is post_filenames_in_year_month calls posts_in_year_month which reads from cache/posts-[year]-[month]-[md5 of require_tag . " " . require_type] and most_recent_post_filenames reads from cache/dir-[md5 of source_path . /posts] for some reason the post doesn't make its way into the posts in year month cache, although it does in the dir- cache, so thats the next place I'll look into, how/when those caches are created. |
Its entirely possible that I'm missing something, but it seems like once the cache file is created for the month archive it never gets updated unless its manually deleted because of the following lines: engine/Updater.php 48 - 50
since the $cache_fname value is set to:
and that filename won't change for the month's archive, it will only reach the else statement and update the archive cache file when it has been deleted. By eliminating that if statement, it correctly updates the archive for me, but I feel like I'm missing something. |
These are taken from Marco's own Readme. I figured I'd put them as issues that can be discussed, resolved.
"The month archives sometimes only contain a few posts."
Further information welcome.
The text was updated successfully, but these errors were encountered: