Jump to content


Replying to Error Displaying Some Comments


Post Options

  or Cancel


Topic Summary

pctdoug

Posted 07 January 2013 - 06:08 PM

I just updated to WP 3.5 and was seeing this problem as well. The plugin update resolved the issue. Thanks.

Posted 03 January 2013 - 05:12 PM

Hi,
This error had been fixed in the latest version of the plugin available from our members download area. The problem is that the download on wordpress.org has conflicting version numbers with the plugin we maintain on our servers. We are working on a fix for this problem but downloading the plugin directly from our site will give you the latest version in the meantime.

Gerroald

Posted 03 January 2013 - 04:40 PM

Hello All,

Thanks for the concern and the information. I'll be sure and pass this information to the developer.

Thanks Again,

Gerroald

Posted 03 January 2013 - 12:58 AM

Definitely there. Wordpress 3.5 + wp-ajax-edit-comments 5.0.7.0


FastCGI: server "/var/www/fastcgi/php5.fastcgi" stderr: PHP message: PHP Warning:  Missing argument 2 for wpdb::prepare(), called in /var/www/standard3a/wp-content/plugins/wp-ajax-edit-comments/lib/class.core.php on line 470 and defined in /var/www/standard3a/wp-includes/wp-db.php on line 990, referer: http://thestandard.org.nz/climate-last-year-and-this-year/comment-page-1/

Bloody noisy in the logs as well. I had to fix it.

As Kevin Davidson says, just add the required missing parameter. In this case the most appropiate is probably an empty array.

Fixes in bold
file: lib/class.core.php

Line 464

$newComment = $wpdb->get_row( $wpdb->prepare( $query, [b]array()[/b] ), ARRAY_A);

Line 470:
$postContent = $wpdb->get_row( $wpdb->prepare( "SELECT meta_value FROM $wpdb->postmeta WHERE post_id = " . $comment['comment_post_ID'] . " and meta_key = '_" . $comment['comment_ID'] . "'", [b]array()[/b] ), ARRAY_A);

Posted 24 December 2012 - 05:29 PM

The error in the code is obvious in the line indicated by the error message. The function call requires 2 arguments, and the plug-in code provides one. It was a change in WordPress 3.5.

In order to replicate the error, you have to have error reporting set to display to the user, and this is not a best practice and you may well not have it set that way. Also, as I said before, you can't be logged in to the blog to generate the error.

Gerroald

Posted 20 December 2012 - 04:50 PM

Hello Ethan,

Could you please (and always :smile:) share a URL to your site and the screenshots?

I haven't been able to replicate this either. It does seem to be a bug and I've reported it. I'll let you know here as soon as I hear something.

Thanks for you patience!

Gerroald

Posted 18 December 2012 - 01:53 PM

We use AEC v5.0.7.0 and just upgraded to WP 3.5. A reader sent in some screen captures with this same problem.

"Warning: Missing argument 2 for wpdb::prepare(), called in /home/onepro/public_html/wp-content/plugins/wp-ajax-edit-comments/lib/class.core.php on line 470 and defined in /home/onepro/public_html/wp-includes/wp-db.php on line 990"

The comment still appears after the warning.

It's not on every comment (original and/or reply comments), and I don't see a pattern. I'm only working off the screen captures because I haven't been able to recreate the problem (logged in or logged out).

Suggestions?

Posted 13 December 2012 - 06:26 PM

I'll try it out as soon as it appears for download (still 5.0.7.0 at wordpress.org)

By the way, the error doesn't appear to the blog owner; one has to log out.

I turned off error reporting so that users wouldn't see the error, and now the edit window is blank when invoked.

View PostGerroald, on 12 December 2012 - 03:29 PM, said:

Hello Kevin,

There has been an update to Ajax Edit Comments for this issue. After you update if you have any other problems please let us know!

Thanks,

Gerroald

Gerroald

Posted 12 December 2012 - 03:29 PM

Hello Kevin,

There has been an update to Ajax Edit Comments for this issue. After you update if you have any other problems please let us know!

Thanks,

Gerroald

Gerroald

Posted 12 December 2012 - 10:01 AM

Hello Kevin,

I haven't been able to replicate this. Could you try checking for a plugin conflict? Try deactivating all other plugins and see if the warning is still there. If it's not, then reactivate your plugins one at a time until you find the culprit.

Please let me know if this helps!

Thanks,

Gerroald

Review the complete topic (launches new window)