Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#35424 closed defect (bug) (invalid)

comments and custom db writing stopped working

Reported by: keiron77's profile keiron77 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Database Keywords: reporter-feedback
Focuses: Cc:

Description

Since v4.4 we have found that when submitting comments the visitor is presented with "Sorry, comments are closed for this item." also when writing to a custom database using the following code we get an unknown error:

<?php $wpdb->insert('wp_mytable', array('field_one'=>$_POST['one'], 'field_two'=>$_POST['two'], 'field_three'=>$_POST['three'], 'field_four'=>$_POST['four']), array('%s', '%s', '%s', '%s');

We can't even get an error to display using:

<?php $wpdb->print_error();

I have removed all plugins and it made no difference. Version 4.4.1 still has the problem but 4.3.2 is ok. It appears to be a database error.

Change History (5)

#1 @keiron77
9 years ago

  • Summary changed from comments ans custom db wring stopped working to comments and custom db wring stopped working

#2 @keiron77
9 years ago

  • Severity changed from normal to major

#3 @SergeyBiryukov
9 years ago

  • Summary changed from comments and custom db wring stopped working to comments and custom db writing stopped working

#4 @dd32
9 years ago

  • Keywords close reporter-feedback added
  • Severity changed from major to normal

Hi @keiron77

This sounds like the values contain a value which isn't valid for the column you're inserting it into, or something similar. If that's the case, the first stop is probably going to be to add debugging within the wpdb->process_fields() method in wp-includes/wp-db.php.

If you're able to reproduce it on a new WordPress installation, if you can offer the minimal code needed to trigger it, it may help show any core bug.

Unfortunately, your report doesn't give us much to go on, so any extra details you can offer will be appreciated.

#5 @pento
9 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

No feedback.

Note: See TracTickets for help on using tickets.