1 rossputin Jan 12, 2011 17:04
3 rossputin Jan 15, 2011 04:30
Sam,
When I upgraded from 3.3.3 from 4.0.2, this stopped working.
When I click on the link you included with the orderby=datemodified, it gives me a list of articles that I have not edited in months or years. Furthermore, it seems like the list changes with some regularity even when I don't edit anything.
I wonder if something happened in a database modification during the upgrade.
4 sam2kb Jan 15, 2011 04:57
Check the database, and see what you have in evo_items__item table in post_datemodified field.
"orderby=datemodified" dates should be more recent than "orderby=datecreated" if that's true the database was altered for some reason.
5 rossputin Jan 15, 2011 05:12
Many of the old posts that I haven't looked at or modified in months or years have modified dates in the past few days.
By the way, if you go to the orderby= link which you gave me, you'll see that all the items in the list of recently edited are now different than just 20 minutes ago even though I haven't even been at my computer except to respond to you!
All this started happening since upgrading to 4.0.2.
6 rossputin Jan 15, 2011 15:41
basically, it looks like the system is modifying the modified dates on my posts.
i wonder if anyone else is having this problem. i can't say i'm enjoying this.
any thoughts?
7 yabba Jan 15, 2011 17:10
Item view count is the cause ;)
¥
8 rossputin Jan 15, 2011 17:42
¥åßßå, what does your answer mean and how do I fix it?
Thanks!
Ross
9 yabba Jan 15, 2011 17:47
It means that I went to your site, pulled up your archives, chose some really old posts and viewed them. I then hit "orderby=datemodified" and there they were ;)
No idea what the fix is, I don't play with any version of evo beyond 3.x
¥
10 rossputin Jan 15, 2011 17:55
What's weird is that the "date modified" value in the database is being changed for lots of blog notes that I'm not modifying or viewing. I have no idea what to do with this!
11 sam2kb Jan 15, 2011 18:27
@¥åßßå
Good catch :)
The topic goes to the bugs section.
12 rossputin Jan 15, 2011 18:38
Just to reiterate what ¥åßßå said, I checked a particular entry on my blog within the database that had an old modified date. Then I did went to that posting on my blog site. Then I went back to the database and the modified date had been changed to the time I viewed the blog note.
So, obviously that's a problem.
In addition, I wonder why all those other old articles are showing as being read (i.e. modified given the current bug) now, when I'd bet money that nobody is reading a 4-year old blog note on an obscure topic. Even RSS readers shouldn't be hitting those. I wonder if any sort of search engine or other "crawler" activity is also messing up the modified date.
13 yabba Jan 15, 2011 19:01
Spammers ;)
¥
14 yabba Jan 15, 2011 19:03
sam2kb wrote:
@¥åßßå
Good catch :)
It was the "obvious" answer, only way the posts could have been modified is by "the public" ( assuming no security holes ) ... viewing a post/making a comment was the only way that could happen. Those posts didn't have new comments ;)
¥
15 rossputin Jan 15, 2011 19:06
so I guess those "spammers" are also artificially inflating my site statistics...
anyway, I'm glad that you (I think) and Sam agree with me that this is a new bug.
I hope it doesn't take too long to be fixed!
I wonder if fplanque is looking...
16 yabba Jan 15, 2011 19:11
Spammers *always* artificially inflate your stats ... some of my posts have thousands and thousands of views ... pretty damn sure they're not that interesting ;)
You can probably kill "$Item->count_views()", or whatever it is, in your template as a stop gap ... your ego will be bruised when it looks like nobody reads your posts though ;)
¥
17 rossputin Jan 15, 2011 19:13
i don't care about the stats, really.
I do care about that "recently edited" list because it usually contains the blog notes that I want to edit again!
18 yabba Jan 15, 2011 19:30
In your skin, find the view count stuff and kill it ... or you might need to add "don't count views" ... not helpful, sorry, but I *really* don't play with recent evo releases.
Sam will know though ;)
¥
19 rossputin Jan 15, 2011 19:38
Are you saying that will fix the "recently edited" problem or just stop inflated stats?
20 sam2kb Jan 15, 2011 19:41
Before you kill the counter, can you enable debug and copy all queries here? It would be good to know why post date gets updated.
The only query in inc_viewcount() updates post_views and nothing else
$DB->query( 'UPDATE T_items__item
SET post_views = post_views + 1
WHERE '.$this->dbIDname.' = '.$this->ID );
21 sam2kb Jan 15, 2011 19:46
BTW to kill post views counter you don't need to disable stats, just add this code either in _body_footer.inc.php or in _html_footer.inc.php file.
$GLOBALS['shutdown_count_item_views'] = 0;
22 rossputin Jan 15, 2011 20:01
Sam,
I'll do whatever you want with debug if you can instruct me very specifically how to do it.
I'm not expert at this stuff, but can manage fairly well with instructions.
23 sam2kb Jan 15, 2011 20:14
In /conf/_advanced.php set a debug password (something simple) and PM it to me.
$debug = 'pwd';
$debug_pwd = 'whatever';
Hopefully I'll find what's updating the database
24 sam2kb Jan 15, 2011 21:19
Found it. First of all this is not a bug in b2evo.
The Mystique skin uses short links in "Share this" block. If a post doesn't have a short link (all old posts) b2evo automatically creates one updating the post and modification date.
I still think it shouldn't update mod date though, so I changed this in CVS.
To fix this edit _item.class.php:4422
replace this
if( ! $this->dbupdate() )
with this
if( ! $this->dbupdate( false ) )
You can disable debug now, thanks.
25 rossputin Jan 15, 2011 22:14
Sam,
I am beyond impressed.
Thank you very very much.
Best,
Ross
26 sam2kb Jan 15, 2011 23:55
No problem :)
The list is sorted by "datemodified", the code has not been changed since b2evo 3. Make sure you're not viewing some rarely updated blog.
The posts should match those displayed here
http://rossputin.com/blog/index.php?orderby=datemodified