We’re you using the mass edit tool at all? If tweeting on quick edit is enabled, that can result in a flood of tweets. It’s not enabled by default.
Multiple posts were trashed but not edited. The option “Allow status updates from Quick Edit” is disabled. So I don’t think either of those were it.
Does the plugin feed off the RSS stream? I’m wondering if somehow that got garbled and then triggered the flood of tweets.
Sean
No, the plug-in doesn’t have anything to do with the RSS feeds. It only operates on publish or edit actions. Trashing wouldn’t trigger anything.
Were the Tweets using your Tweet template for WP to Twitter? I’m wondering whether the Tweets could have come from something else.
The tweets were all made using the WP to Twitter template, which nothing else uses, so I’m fairly confident the tweets originated from the plugin. Anything else I should look at?
Honestly, I can’t think of anything. This is something that has been reported to me literally 2 or 3 times in the last few years — and with the size of the user base, that’s incredibly rarely, so I really don’t have any information about it. It seems like some kind of bug or unexpected interaction with another plug-in action, but I just don’t have enough information about it to track it down. I’ve never seen it happen or been able to reproduce it except given circumstances where it would be expected – such as mass editing with Tweet on quick edit enabled.
Just to give my personal contribution to this problem…
The plugin can post multiple tweets if the “Allow status updates from Quick Edit” option is selected. This behaviour is controlled by the option wpt_inline_edits
. Is it possible that this option is changed by some other plugin?
I would suggest to use a value more complex than 1
to identify that the user has checked this sensitive option and to change the logic of lines 664-668
of wp-to-twitter.php
to:
if ( get_option('wpt_inline_edits') == 'this_is_a_complex_value' ) {
if ( isset($_POST['_inline_edit']) ) { $is_inline_edit = true; }
} else {
if ( isset($_POST['_inline_edit']) ) { return; }
}
this could reduce the probability of unwanted behaviours.
However as I can see, the plugin can send multiple posts when I bulk edit posts (e.g., adding a tag to posts) or when I recover posts from trash. Am I wrong?
The option name is not used by any other plugin in the repository, so it’s relatively unlikely that it is getting changed by another plugin. Further, if it was getting changed somewhere else, it would show up as being checked in the WP to Twitter settings panel. So that isn’t a likely candidate.
Regarding your second question, are you assuming that the option is enabled? Regardless, recovering posts from the trash shouldn’t trigger anything, since that isn’t a publish transition.
Best,
Joe
With the option OFF, I can see that the function jd_doTwitterAPIPost
is called for every post I update with a “bluk operation”, for example by adding a new tag or recovering posts from trash. In both cases $_POST['_inline_edit']
is not set, thus the value of wpt_inline_edits
is not important. In jd_doTwitterAPIPost
, the plugin only checks for duplicates of the last tweet.
(WordPress 3.5.1)
For the record, I did find this issue, and will be updating WP to Twitter – in bulk edit, I need to be checking for the key ‘bulk_edit’ in the _REQUEST array. I think this is a change; because this filter certainly used to work, but thanks for noticing it.