Opened 9 years ago
Closed 9 years ago
#35424 closed defect (bug) (invalid)
comments and custom db writing stopped working
Reported by: | 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)
Note: See
TracTickets for help on using
tickets.
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 inwp-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.