CFDB7 does not mark all messages as read
-
I am having trouble with CFDB7 does not mark all messages as read.
The problem occurs both when a message has been read or when I use bulk read and unread.My current installation
WordPress version 4.8.2
Contact Form 7 version 4.8.1
Contact Form CFDB7 version 1.1.4The php error log
[26-Oct-2017 21:56:07 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't figure out how to attach) ";}' WHERE form_id = '192'' at line 1 for query UPDATE wp_db7_forms SET form_value = 'a:5:{s:12:"cfdb7_status";s:6:"unread";s:9: [...] photos, but can't figure out how to attach) ";}' WHERE form_id = '192' made by do_action('toplevel_page_cfdb7-list'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, Cfdb7_Wp_Main_Page->list_table_page, Cfdb7_Wp_Sub_Page->__construct, Cfdb7_Wp_Sub_Page->list_table_page, CFDB7_List_Table->prepare_items, CFDB7_List_Table->process_bulk_action
The errors occur in the mysql when a quote is appear in the serialise string.
Patch
I have patched my files by adding this line (below) to the file inc/admin-form-details.php at line 80 and to the file inc/admin-subpage.php at line 315 and again at line 332 after the insert at line 315.
$form_data = mysql_real_escape_string( $form_data );
This affects mysql update in the methods form_details_page and process_bulk_action so the serialise string is escaped for the mysql.
- The topic ‘CFDB7 does not mark all messages as read’ is closed to new replies.