Trackback/Comments counter not reliable in bullet proof?
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Trackback/Comments counter not reliable in bullet proof?
Hi.
Today I noticed a strange habit of BP from s9y 1.4 alpha: My newest article counts 0 comments and 0 trackbacks in the footer, what is wrong, it has both. All other articles show correct counters. Strange.. I also switched the two display modes for counters, but this changes nothing (related to the problem)
Any idea what might went wrong here?
You can see it at my blog at the moment: http://blog.brockha.us
Today I noticed a strange habit of BP from s9y 1.4 alpha: My newest article counts 0 comments and 0 trackbacks in the footer, what is wrong, it has both. All other articles show correct counters. Strange.. I also switched the two display modes for counters, but this changes nothing (related to the problem)
Any idea what might went wrong here?
You can see it at my blog at the moment: http://blog.brockha.us
Re: Trackback/Comments counter not reliable in bullet proof?
The really funny thing is that you posted a newer article in the meantime, which I posted a comment on ... and it's working there again. Weird.blog.brockha.us wrote:My newest article counts 0 comments and 0 trackbacks in the footer, what is wrong, it has both. All other articles show correct counters.
So it seems to be specific to that particular article. I suppose the invalid HTML in that article might be a point to tackle the problem. There's a non-closed img tag, but I think that's coming from the ebay-plugin in the sidebar.
Another idea: You have a lot of code in that article - are the special characters in there masked? Maybe that's confusing the smarty code in BP's entries.tpl (which would happen with any template).
YL
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Hmm.. One thing that differs this problem article from the others: I deleted some test comments by me on that article.. Perhaps, there is a problem in the s9y core when doing this? I don't think the HTML should interfere the smarty processing, don't you think so, too?
P.S.: uhm.. And what HTML problem did you find? The ebay plugin produces valid HTML as far as I can see..
P.S.: uhm.. And what HTML problem did you find? The ebay plugin produces valid HTML as far as I can see..
Well, I have seen a lot of things which should not have happened, but did, so ...blog.brockha.us wrote:I don't think the HTML should interfere the smarty processing, don't you think so, too?
If so, it's more likely the Smarty code in that particular post (first and second blockquote) is the source of error. Try removing those two blockquotes from the article or masking the {/if} statements in there.
Can't say much about the deleted comments ... I think it shouldn't be a problem, but actually, that's a question for Garvin
YL
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Check the serendipity_entries.comments column. It seems to hold "0" for you.
Usually this number is incremented and decremented by s9y when you delete comments. The counter would only be off, if you use SQL to delete comments or anything other than the official s9y methods.
Also, numbers might get off when unapproved comments are deleted. Unapproved comments only add to the counter once they are approved...
Regards,
Garvin
Check the serendipity_entries.comments column. It seems to hold "0" for you.
Usually this number is incremented and decremented by s9y when you delete comments. The counter would only be off, if you use SQL to delete comments or anything other than the official s9y methods.
Also, numbers might get off when unapproved comments are deleted. Unapproved comments only add to the counter once they are approved...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
@Garvin: The columns are set to 0!
I only used the normal s9y functionality to write and delete the comments. And btw: I never deleted a trackback.
So there seems to be a problem in 1.4 alpha with the comment delete function..
Btw: Today a new trackback came in on that article. It didn't increase the trackback counter, too.. This happened a lot after I wrote and deleted the test comments..
The problem article: http://blog.brockha.us/index.php?/archi ... pdate.html
P.S.: This article has a very strange trackback from Robert, too. Perhaps this is producing the problems?
I only used the normal s9y functionality to write and delete the comments. And btw: I never deleted a trackback.
So there seems to be a problem in 1.4 alpha with the comment delete function..
Btw: Today a new trackback came in on that article. It didn't increase the trackback counter, too.. This happened a lot after I wrote and deleted the test comments..
The problem article: http://blog.brockha.us/index.php?/archi ... pdate.html
P.S.: This article has a very strange trackback from Robert, too. Perhaps this is producing the problems?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Slady I currently don't have the time to check this.
The counter increasion is here:
include/functions_comments.inc.php, function serendipity_approveComment():
serendipity_approveComment should be called from all instances where comments are added (or they wouldn't also be approved).
Regards,
Garvin
Slady I currently don't have the time to check this.
The counter increasion is here:
include/functions_comments.inc.php, function serendipity_approveComment():
Code: Select all
if ($moderate) {
$query = "UPDATE {$serendipity['dbPrefix']}entries SET $field=$field-1, last_modified=". $lm ." WHERE id='". (int)$entry_id ."'";
} else {
$query = "UPDATE {$serendipity['dbPrefix']}entries SET $field=$field+1, last_modified=". $lm ." WHERE id='". (int)$entry_id ."'";
}
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Well, I guess the code could be reworked to count all comments and trackbacks and setup the counters with those values, yes.
The performance impact should be okay, since only the comments for the specific entry would be fetched.
Regards,
Garvin
Well, I guess the code could be reworked to count all comments and trackbacks and setup the counters with those values, yes.
The performance impact should be okay, since only the comments for the specific entry would be fetched.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
I cannot reproduce this error on my 1.4 sandbox..... any luck resolving it yet Grischa?
And the German to English translator was not too helpful for that entry... what exactly is the new functionality, something about "opt-in"? Also looks like new smarty variables have been added so success or failure messages can be styled differently? We could definitely add those classes into the BP colorsets.
And the German to English translator was not too helpful for that entry... what exactly is the new functionality, something about "opt-in"? Also looks like new smarty variables have been added so success or failure messages can be styled differently? We could definitely add those classes into the BP colorsets.
=Don=
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
No, I didn't had time to look into the code yet. And it's getting worse: Now another article shows 0 comments and 1 trackback, after the 21. trackback came in on that article. It has something about 11 comments and 21 trackbacks.
It seems, that incoming trackbacks are clearing the counters *sometimes*: The first 20 trackbacks came in without a problem (some of them where done with my new 1.4 installation), but the 21st cleared the stats..
EDIT: I corrected the counters now changing the db fields, so now everything looks fine again for the moment..
@Don: In Germany we have a law saying that newsletter registrations has to be validated using a "double opt-in" or "confrmed opt-in". This means: If you register to a newsletter, the newsletter first has to send you an email with an affirmation link. Only if you click this link, you should get news. The "Subscribe to comments" functionality is seen as a newsletter, too. So s9y is missing an affirmation at that point.
And yes, I added some new smarty variables I would like to see included into the BP template, so I don't have to patch my changes on every update. How they are called and how they should be used is shown in my article http://blog.brockha.us/index.php?/archi ... pdate.html, you already saw I guess..
It seems, that incoming trackbacks are clearing the counters *sometimes*: The first 20 trackbacks came in without a problem (some of them where done with my new 1.4 installation), but the 21st cleared the stats..
EDIT: I corrected the counters now changing the db fields, so now everything looks fine again for the moment..
@Don: In Germany we have a law saying that newsletter registrations has to be validated using a "double opt-in" or "confrmed opt-in". This means: If you register to a newsletter, the newsletter first has to send you an email with an affirmation link. Only if you click this link, you should get news. The "Subscribe to comments" functionality is seen as a newsletter, too. So s9y is missing an affirmation at that point.
And yes, I added some new smarty variables I would like to see included into the BP template, so I don't have to patch my changes on every update. How they are called and how they should be used is shown in my article http://blog.brockha.us/index.php?/archi ... pdate.html, you already saw I guess..
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Thanks for the explanation Grischa - makes perfect sense since, for instance, I could subscribe to comments, but enter YOUR email address and force you to receive unwanted emails without this confirmed opt-in.
Any idea what the content message says for both success and error? If we can use the simple words "error" and "success" as headings to those messages, this might be a cool revision on your change to content.tpl:
But until I can see what those error and success messages are, I don't want to commit this change with the extra Entry_Date div and <h3>.
Any idea what the content message says for both success and error? If we can use the simple words "error" and "success" as headings to those messages, this might be a cool revision on your change to content.tpl:
Code: Select all
{elseif $subscribe_confirm_error}
<div class="serendipity_Entry_Date">
<h3 class="serendipity_date">{$CONST.ERROR}</h3>
<div class="serendipity_content_message comment_subscribe_error">{$content_message}</div>
</div>
{elseif $subscribe_confirm_success}
<div class="serendipity_Entry_Date">
<h3 class="serendipity_date">{$CONST.SUCCESS}</h3>
<div class="serendipity_content_message comment_subscribe_success">{$content_message}</div>
</div>
{else}
<div class="serendipity_content_message">{$content_message}</div>
{/if}=Don=
-
blog.brockha.us
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Today I also had a problem with internal trackbacks. I use the v.1.4-beta1 with bulletproof. The trackback from a newer Article is not counted.
The url with the problem is here:
http://www.dd4kids.de/archives/124-Bike ... esden.html
The url with the problem is here:
http://www.dd4kids.de/archives/124-Bike ... esden.html