WordPress.org

Ready to get started?Download WordPress

Forums

Strictly Tweetbot
[resolved] Error messages and not working (10 posts)

  1. Norman C Hoffmann
    Member
    Posted 4 months ago #

    I got these error messages when I pressed test configuration. I am also using Strictly Autotags too.

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/xxxxx/public_html/xxxxx/wp-content/plugins/strictly-tweetbot/strictly-tweetbot.class.php on line 716 and defined in /home/xxxxx/public_html/xxxxx/wp-includes/wp-db.php on line 1147

    https://wordpress.org/plugins/strictly-tweetbot/

  2. Strictly Software
    Member
    Plugin Author

    Posted 3 months ago #

    I use both plugins on big systems and I have stayed on 3.81 and I have no errors at all with the combination of the two plugins or the test config button so I guess it might be an update to WP code?

    Are you using WP 3.9 or WP 3.91 ?

    If you are, then you will know from using Strictly AutoTags and from my blog and from the max WP stable version that WP 3.9 is not supported yet for Strictly Auto Tags.

    You could rollback WP 3.9 to 3.81 (they changed a lot of Database code that my AutoTags uses) and see if that helps.

    Or find out what the problem with this new function parameter is and try and fix it - I don't have the time at the moment to sort it sorry.

    When I get a chance I will look at it but I guess it's to do with WP changing all their core code again and then giving us plugin developers an email the night before they roll it out telling us that a load of our code might break if people update.

  3. Strictly Software
    Member
    Plugin Author

    Posted 3 months ago #

    Hi

    Can you try something for me if you have upgraded to 3.9+

    On that line it's erroring on I am trying to run some SQL but I am runnin the SQL through the prepare function which it doesn't really need to do due to there being no replacements.

    so a few lines above lin 716 you will see an sql statement like this

    $sql =  $wpdb->prepare("SELECT	id, post_title
    	FROM	{$wpdb->posts} wp
    	WHERE	post_password='' AND post_status='publish' AND post_type='post'
    	ORDER BY post_modified_gmt DESC
    	LIMIT 0,1;");

    Can you just remove the £wpdb->prepare wrap around function e.g

    $sql = "SELECT	id, post_title
    	FROM	{$wpdb->posts} wp
    	WHERE	post_password='' AND post_status='publish' AND post_type='post'
    	ORDER BY post_modified_gmt DESC
    	LIMIT 0,1;";

    Then try that and see if it works.

    If it does work PLEASE LET ME KNOW.

    Because a) WP could have just been clever and said if there were no $args passed into their DB function on line 1147 to just ignore them.

    and b) Save a hell of a lot of developers time.

    If that does work and you get similar error messages do the same thing e.g remove the prepare function.

    And please let me know if it works!

  4. Strictly Software
    Member
    Plugin Author

    Posted 3 months ago #

    from what I can see from the new WP 3.9 DB class they rewrote to handle the newer MySQL functions MySQLi e.g

    mysqli_insert_id

    instead of

    mysql_insert_id

    They have added these lines to the top of the prepare function which will obviously catch many people out.

    If you want a quick fix just remove them

    function prepare( $query, $args ) {
    if ( is_null( $query ) )
    	return;
    
    // This is not meant to be foolproof -- but it will catch obviously incorrect usage.
    if ( strpos( $query, '%' ) === false ) {
    	_doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' );
    }}

    Then it won't be looking for % in any prepare statement anymore

  5. Strictly Software
    Member
    Plugin Author

    Posted 3 months ago #

    I have removed the prepare statement and done an update to the code so it should work - let me know

  6. Norman C Hoffmann
    Member
    Posted 3 months ago #

    Hi, thank you. I am using Version 3.9.1.

    I just re-installed and activated Strictly Tweetbot. There have been no error messages.

    I am just waiting for FeedWordPress to do it's thing... brb

  7. Norman C Hoffmann
    Member
    Posted 3 months ago #

    Hmmm, Tweetbot posts hand written articles using WP Version 3.9.1 but it is not posting articles published automatically by FeedWordpress.

    I have not been able to duplicate the original error messages after upgrading to Version 3.9.1

    I am going to rollback WP 3.9.1 to 3.81 and see what happens... brb

  8. Strictly Software
    Member
    Plugin Author

    Posted 2 months ago #

    I have no heard back from you so does that mean it was an error in Feed Fetcher?

    Have they got people complaining about issues with 3.9 in their support forum?

    Remember other plugins will have had to change their code for 3.9

    There could be security issues changed or parameters/functions added/changed that they need to change as well.
    There could be access issues preventing remote posting of articles through certain users. Can you post logged in as admin okay?
    Issues with their own DB code and DB functions?
    Issues with anything people complain about on their own support forum.

    Did you rule out the plugin by taking it out the equation?
    Did you try replacing it with WP-O-Matic to see if that changed anything?
    Is it only remotely posted articles not working. E.G those initiated by a CRON job thst are then post articles.
    Can you manually init the feed from their admin to post articles okay?
    If you don't use the plugin do the two plugins work together okay like you said before.

    Remember to do the standard debug from the readme.txt file

  9. Norman C Hoffmann
    Member
    Posted 2 months ago #

    Hi, so sorry I haven't been able to get back to you.

    OK, this is what happened. I rolled back to 3.81 but for some reason I still had the same problem. So, I updated back to 3.9.1.

    Then yesterday I finally got some time to get back to the site and I tried with Tweetbot once again by turning it back on first in 3.9.1 and all of a sudden it started to work with autoposting.

    That was the main issue, Tweetbot was not posting Feedwordpress updates. But, it is now. Though, I didn't do anything to the plugin.

    I will keep an eye on it. Is there anything you want me to try or anything to help you out some more?

  10. Strictly Software
    Member
    Plugin Author

    Posted 2 months ago #

    Well apart from that single update to Strictly AutoTags I did the other month to remove the prepare statement I haven't done anything to the code.

    Therefore I guess it was probably something like an out of memory issue on your server causing the feed importer to die and all the actions that link Tweetbot to publish bombing out etc.

    Any errors from Twitter or the process of tweeting are always listed in the top panel of the TweetBot so maybe keep an eye on that to see if there is a problem with Twitter that is causing the tweets not to be posted e.g duplicate posts OR your settings have made the post irrelevant to be posted - e.g content analysis/noise words.

    Apart from that I cannot think of a reason apart from your server or the feed importer code which I don't control.

    Thanks

Reply

You must log in to post.

About this Plugin

About this Topic