Page 1 of 1
More problems with duplicate posts
Posted: Tue May 09, 2006 7:28 pm
by Martin Avis
I'm still having problems with multiple duplicate posts whenever I try to post via the Administration Suite.
Previously I thought it was happening because I'd backdated entries, but now find it happens on current dated ones too.
After clicking on save, the page seems to hang for severlal minutes - 5 or more - and then seems to load as it should. But when I look at my blog, anyhting from 5 to 25 copies of the entry have been made.
I don't have any problem with posts made via my autoresponder or general email account.
While I can continue to moblog, and don't NEED to use the Admin Suite, it would be much easier if I could!
Any thoughts?
Martin
Re: More problems with duplicate posts
Posted: Tue May 09, 2006 8:51 pm
by garvinhicking
Hi!
Does this also happen with a different browser?
What Server OS are you using, and which serendipity version? Which event plugins are you using?
Of course this is a seroius issue, which needs to be solved! However you'Re the first to report that; the only other reports of duplicate entries came because of people using IE7.
Regards,
Garvin
Posted: Tue May 09, 2006 9:19 pm
by Martin Avis
Hi Garvin,
I'm using IE6. My Serendipity is version 1.0-beta2.
Event Plugins in the order that appear on my list are:
Markup: Serendipity
Markup: Emoticate
Markup: NL2BR
Browser Compatibility
Spam Protector
Spartacus
Remember Visitor Category
Announce Entries
Introduction
Community Rating
Extended Properties for Entries
Category Assignment
Send Entries Via Email
POPfetcher
I don't know about the server OS - I'm hosted with H4P if that is any help and the page that they detail their 'features' is on
http://www.host4profit.com/cgi-bin/features.cgi?7655 (that looks like someone's affilaite link, but it isn't mine - I just got it from Google!)
I just tried a test post using Firefox v1.5 and got the same problem: after posting the page hung for 4.5 miutes and the result was 6 duplicate posts.
Martin
Posted: Wed May 10, 2006 10:47 am
by garvinhicking
Hi!
Just for a test, would you be able to temporarily remove those plugins:
Remember Visitor Category
Announce Entries
Introduction
Community Rating
Category Assignment
Send Entries Via Email
Those are the ones where a slight chance exists that they could cause trouble; even thogh they shouldn'T.
When using Firefox, would you be able to install theLiveHTTPHeaders extension and log the HTTP output that happens when you post an entry? Or give me an author account on your blog that I could try it? (contact me via PM if you want this)
You aren't running any special proxy or webfilter software on your computer?
Regards,
Garvin
Posted: Wed May 10, 2006 6:06 pm
by Martin Avis
Hi Garvin,
Okay, I've tracked it down.
The problem is being caused by 'Announce Entries'.
To answer your question, I'm not running special proxies or filter software that I know about!
You are very welcome to go into my Admin panel and play around for yourself. I'll PM you the login details.
Martin
Posted: Wed May 10, 2006 6:09 pm
by garvinhicking
Hi!
Okay, so if you disable "Announce Entries", everything works? That is quite strange, as this plugin shouldn't cause that behaviour, as it just sends pings to outgoing servers.
Is your server maybe blocking outgoing HTTP connections, or maybe does that pinging plugin report errors in your PHP or Apache Errorlog?
When you post an entry, which checkboxes for pinging webservices do you enable? Does the problem also happen if you just check a single service in the boxes?
Did you enter any custom services into the plugins configuration?
Regards,
Garvin
Posted: Wed May 10, 2006 6:42 pm
by Martin Avis
Phew! Loads of questions - I'll do my best to answer them!
I've removed everything you asked me to and then put them back one at a time - on their own - to see what happened. The problem only recurred when Announce Entries was put back.
I had the boxes for Ping.o.matic, blo.gs, blogrolling, technorati, weblogs and Yahoo checked. No custom services.
I have no idea if my server is blocking outgoing HTTP connections. How would I test for this? And as for errorlogs - sorry, that lost me!
Incidentally, I just went back and tested it with only ping.o.matic checked. Same problem. 8 duplicates this time!
Following on from this train of thought - a useful feature request for future updates would be to have the ability to delete multiple entries with one click!
Martin.
Posted: Thu May 11, 2006 8:30 am
by Martin Avis
Hey Garvin, I think I've found the problem.
It appears from posts in various forums that Pinomatic are having major server problems right now and have been down for several days.
With that in mind, I reinstalled Announce Entries and checked everything except for Pingomatic. This time the post went through perfectly.
I'm not sure how the Announce Entries plugin works, but could it be that it expects some kind of response from the ping service and if it doesn't get it within a certain timeframe, keeps trying? If that is so, perhaps it could have some kind on 'on fail' safeguard built in?
Regards,
Martin.
Posted: Thu May 11, 2006 10:49 am
by garvinhicking
Hi!
Actually, the announce entries plugin works like that - it sends a ping to a server and waits for a response. If it doesn't get a response or the serve ris dead, the script just halts. It does no redirection or so. If it does get a response, it will finish.
The entry is saved BEFORE pings are send, to remedy such possible problems, thus something on your server is going on that is forcing the entry iframe which does the pinging to reload consequently. Are you hosten on a Windows IIS server by chance?
It would help if you could create me an account so that I could use Firefox + LiveHTTPHeaders to check what is happening?
Best regards,
Garvin
Posted: Mon May 29, 2006 5:33 pm
by tharos
I'm having the same problems with the anounce plugin and duplicate posts using opera as browser.
If it takes to long to ping, the entry is put on the page several times.
The webserver is a lighttpd on linux, shouldn't refresh the iframe. I don't know if opera automaticaly refreshes the iframe (may be...), but I think this is still a s9y problem.
Can you do the pingback-stuff in the background like wordpress is doing it (at least i think it's handled like this in wp2.0)
The blog also shows the same "blocking" behavior like written in this thread:
http://www.s9y.org/forums/viewtopic.php?t=5426 (although german).
Pinging should imho somehow happen nonblocking in the background
Posted: Mon May 29, 2006 9:34 pm
by garvinhicking
Hi!
Actually the pingback stuff is already performed in the "background", hence the iframe. As soon as the iframe is shown, the entry is saved.
It is the PEAR class that is acting weird on connectivity issues. Sadly inspecting the PEAR class is currently outside of my timing schedule, it would take serous debugging to patch up the class to better deal with those issues...
The "blocking" behaviour is fixed in serendipity 1.1 versions, it was caused by "locked" PHP sessions.
Best regards,
Garvin
Posted: Tue May 30, 2006 12:07 pm
by tharos
garvinhicking wrote:Hi!
Actually the pingback stuff is already performed in the "background", hence the iframe. As soon as the iframe is shown, the entry is saved.
And just putting the "post entry" stuff somewhere, where refreshing (done by whatever application) doesn't double stuff?
Posted: Tue May 30, 2006 12:51 pm
by garvinhicking
Hi!
You lead me to a terrific clue.
Inserting
Code: Select all
$_SESSION['save_entry']['id'] = (int)$entry['id'];
before these lines:
Code: Select all
if (!serendipity_db_bool($entry['isdraft'])) {
serendipity_plugin_api::hook_event('frontend_display', $entry, array('no_scramble' => true, 'from' => 'functions_entries:updertEntry'));
serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'] . $entry['extended'], $newEntry);
}
in the function serendipity_updertEntry() in include/functions_entries.inc.php saves the entry id of a frame. So that any reload to that screen will put in the right entry id to the sesion, nad if the iframe is reloaded, it will only "reload" the current entry and not post a new one.
I've also just committed this to SVN.
Best regards,
Garvin
Posted: Tue May 30, 2006 2:07 pm
by tharos
I'll give this a try. Thanks
Posted: Fri Jun 02, 2006 3:34 pm
by tharos
OK, your fixes seems to work - no more duplicated posts.
Thanks
