Jump to content


Welcome to the forum:

Welcome to the iThemes, PluginBuddy and WebDesign.com forum. We've created several tutorial video's to help you get you started with using the forum, please check them out!

Also take note of the forum guidelines.


Support hours:

Our moderators actively respond to forum support requests during normal business hours which are Monday-Friday, 8am - 5pm Central Standard Time, typically within one business day. Although some moderators choose to work during the weekends, we can not guarantee immediate attention to your requests. Thanks for understanding.

What is included with support:

Premium support includes theme/plugin issues such as: bugs encountered under normal operation, how to use basic features, basic WordPress help, and basic help with customization (meaning we point you to resources and will help in more depth as time allows). More information.

resolved

Error Displaying Some Comments



This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1 Guest_Kevin Davidson_*

Guest_Kevin Davidson_*
  • Guests

Posted 12 December 2012 - 12:48 AM

I am getting sporadic examples of the this error that appears in user comments on the blog:

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


WordPress 3.5, Hotfix 1.0. Ajax Edit Comments Version 5.0.7.0

#2 Gerroald

Gerroald

    iThemes Support

  • Moderators
  • Others: All Plugins, All Themes, Toolkit, Webdesign
  • 3,541 posts

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

#3 Gerroald

Gerroald

    iThemes Support

  • Moderators
  • Others: All Plugins, All Themes, Toolkit, Webdesign
  • 3,541 posts

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

#4 Guest_Guest_*

Guest_Guest_*
  • Guests

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


#5 Guest_Ethan_*

Guest_Ethan_*
  • Guests

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?

#6 Gerroald

Gerroald

    iThemes Support

  • Moderators
  • Others: All Plugins, All Themes, Toolkit, Webdesign
  • 3,541 posts

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

#7 Guest_Kevin Davidson_*

Guest_Kevin Davidson_*
  • Guests

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.

#8 Guest_Lynn Prentice_*

Guest_Lynn Prentice_*
  • Guests

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);


#9 Gerroald

Gerroald

    iThemes Support

  • Moderators
  • Others: All Plugins, All Themes, Toolkit, Webdesign
  • 3,541 posts

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

#10 Guest_glennansley_*

Guest_glennansley_*
  • Guests

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.

#11 dlietz

dlietz

    Advanced Member

  • Members
  • Others: BackupBuddy, Toolkit
  • PipPipPip
  • 66 posts

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.