Hi all! I am using Askbot 0.7.42 version and I have noticed a bug in main page's data. In every question in the question list, the date/time of the last update does not get refreshed! For example, if I post a question and go to main page I see
0 mins ago and even if I do refresh in 5 minutes, I'll see the same, zero.
I investigated a little, and I saw that even when I change my name, it does not appear in main page question unless I jump into the question and then return to home page again (and not always - sometimes the bug was insisting). Finally, number of views has also same issue.
Of course, as it may be reasonable, when I restart server, everything gets fixed, showing the correct datetime. I tested it both on normal and private browsing in Chrome. It doesn't have to do with the client, I see the same picture from different PCs.
Anyone having similar issues?
We are about to solve this by merging the development branches to master.
We've started using
.timeago() jQuery plugin to recalculate the displayed timestamp renderings in the browsers.
The main reason for this change is to allow much longer caching of the template fragments. We have also moved personalization-related code from
Thanks @Evgeny, looking forward to your solution!
Meanwhile, I tried to have a look into the code, although i'm not familiar with Python at all. I noticed that on
/models/question.py file there is
get_summary_html() function calling
get_cached_summary_html() and if it doesn't return anything (probably meaning that it didn't find the data it seeks at the cache), it then calls
def get_summary_html(self, search_state): html = self.get_cached_summary_html() if not html: html = self.update_summary_html() ...
So, if I comment out the first call and force it to always call
update_summary_html(), problem disappears. Of course that's a stupid workaround that doesn't take advantage of the cache, so system may respond slower. But it works and gives the impression to users that everything is fine, so until team gives the perpanent solution, this may fit you.
Last, I notice that in the same file at line 456 of
invalidate_cached_data() you have lately commented out the call of
invalidate_cached_thread_content_fragment() which deletes stuff from the cache, and I was wondering if that change has anything to do with the problem we discuss here.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2012-05-11 19:30:30 -0500
Seen: 103 times
Last updated: May 12 '12