Timestamp error
-
Hello, I have an issue with WP-TopBar plugin. After migrating to a new server, I receive this error, every time I interact with the plugin:
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 ‘AND COALESCE(TIMESTAMPDIFF( MINUTE, COALESCE(STR_TO_DATE( ‘2014-10-22 08:46:34’ at line 5]
SELECT 1 FROM wp_wp_topbar_data WHEREbar_id
= AND COALESCE(TIMESTAMPDIFF( MINUTE, COALESCE(STR_TO_DATE( ‘2014-10-22 08:46:34’, ‘%Y-%m-%d %H:%i’ ), 0), COALESCE(STR_TO_DATE(start_time_utc
, ‘%m/%d/%Y %H:%i’ ), 0)),0)I receive this error doing any action, from clicking on a menu (like Main Options or Control) to updating changes (clicking on the green update button at the bottom).
And everytime an error occurs, it duplicates entries in the wp_wp_topbar_data table.
I already contacted the hosting company and they say their db is ok.
Can you help me?
I already deleted and reinstalled the plugin.
It’s not a conflict problem with other plugins because it worked with the same configuration before moving to the new server.Thanks
-
What DB server / version are you using? MS SQL? mySQL?
Also, go to the General Settings Tab and copy/paste in your reply the “Server/Install Info” that is listed there.
Bob
My db server is PERCONA SERVER, a MySql alternative (100% compatible, it’s what they say)
Server: Localhost via UNIX socket
Server type: Percona Server
Server version: 5.5.35-33.0-log – Percona Server (GPL), Release rel33.0, Revision 611
Protocol Version: 10
Encoding: UTF-8 Unicode (utf8)WP-TopBar Server/Install Info
Database/Column Check:
Charset (DB_CHARSET): utf8
Collation (DB_COLLATE):
Collation encoding: utf8_general_ciTable Check:
Table Name: wp_wp_topbar_data
Number of rows in databse: 7Options Check:
Plugin is not using the original Options (wptbAdminOptions)
Plugin is not using the DB Options (wptb_db_version)
Plugin is using the new Global Options (wptb_global_options)
Plugin is not using the new Network Options (wptb_network_global_options)Server Check:
fopen setting is ON
PHP Magic Quotes is OFFTime Check:
Server Timezone: UTC
Current Time: 10/22/2014 18:10
Current Time (GMT): 10/22/2014 16:10
WordPress GMT Offset: 2Multisite Check:
Multisite: NoWordPress.org states they only support MySQL (see http://codex.wordpress.org/Database_Description).
There must be something odd with how Percona supports the datestamp functions used to select the TopBar. I would submit a bug report for Percona server.
I don’t have the personal time to instal Perrcona and understand what the issue is.
Bob
Closed – no response
Hi Bob,
I know this is someone else’s support thread, but I am seeing a similar error message in my error logs, and I am not using Percona, as follows;
WordPress database error Table ‘_wordpress.wp_9_wp_topbar_data’ doesn’t exist for query SELECT * FROM wp_9_wp_topbar_data
WHEREenable_topbar
= ‘true’
AND COALESCE(TIMESTAMPDIFF( MINUTE, COALESCE(STR_TO_DATE( ‘2015-03-29 08:23:55’, ‘%Y-%m-%d %H:%i’ ), 0),
COALESCE(STR_TO_DATE(start_time_utc
, ‘%m/%d/%Y %H:%i’ ), 0)),0) <= 0
AND COALESCE(TIMESTAMPDIFF( MINUTE, COALESCE(STR_TO_DATE(end_time_utc
, ‘%m/%d/%Y %H:%i’ ), 0),
COALESCE(STR_TO_DATE( ‘2015-03-29 08:23:55’, ‘%Y-%m-%d %H:%i’ ), 0)),0) <=0
ORDER BYweighting_points
DESC
made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/suffusion/single.php’), get_footer, locate_template, load_template, require_once(‘/themes/suffusion/footer.php’), wp_footer, do_action(‘wp_footer’), call_user_func_array, wptb::wptb_activate_TopBar_html_js, wptb::wptb_build_cacheable_html_jsThis error occurs multiple times for all the sites on my network.
The info on my Server/Install is as follows:
Database/Column Check:
Charset (DB_CHARSET): utf8
Collation (DB_COLLATE):
Collation encoding: utf8_general_ciTable Check:
Table Name: wp_wp_topbar_data
Number of rows in databse: 2
WP-TopBar internal db version: 5.08Options Check:
Plugin is not using the original Options (wptbAdminOptions)
Plugin is using the DB Options (wptb_db_version)
Plugin is using the new Global Options (wptb_global_options)
Plugin is using the new Network Global Options (wptb_network_global_options)Server Check:
fopen setting is ON
PHP Magic Quotes is OFFTime Check:
Server Timezone: UTC
Current Time: 03/29/2015 10:49
Current Time (GMT): 03/29/2015 03:49
WordPress GMT Offset: 7Multisite Check:
Multisite: Yes
Blog ID:1
Super Admin Only:no
Current user can manage_network_plugins: YesMy server info is as follows:
OS Linux Database Data Disk Usage 151.8 MiB
Server LiteSpeed Database Index Disk Usage 67.5 MiB
PHP v5.4.36 MYSQL Maximum Packet Size 256.0 MiB
MYSQL v5.5.40-MariaDB-cll-lve MYSQL Maximum No. Connection 500I will start this as a new topic if you prefer but I thought it might be more useful to both you and others if this was all in one place.
AWOL,
It looks like this is a problem with multisite. The table name is getting “_wordpress” prefixed to the database query. Although the select statement has the correct table name “wp_9_wp_topbar_data”.
The other user was not using multisite, so his issue is different.
Let me look into this. Can you open a new topic, something like “multi-site sql query issue”?
Bob
- The topic ‘Timestamp error’ is closed to new replies.