I have a WP site up and running for my wife and she attempted to install a text widget that linked to her Twitter account (she says HTML was taken from Twitter.com). I am not sure exactly what she did or what was going on, but now she gets the following error when going to /wp-admin of the site:

WordPress database error Array for query INSERT INTO `wp_options` (`option_name`, 
`option_value`, `autoload`) VALUES ('widget_text', 'a:2:{i:2;a:0:{}
s:12:"_multiwidget";i:1;}', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES\
(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES
(`autoload`)--SERIALIZED made by require_once, require_once, require_once, 
require_once, do_action, call_user_func_array, wp_widgets_init, do_action, 
call_user_func_array, WP_Widget_Factory->_register_widgets, WP_Widget->_register, 
WP_Widget->get_settings, wp_convert_widget_settings, update_option, add_option 

I have no idea what this even means. I am running WP on a Windows Server 2008 installation with SQL Server 2008. If you need more information, I will be glad to supply it. I really am not sure how to recover her site from this.

Thanks!

Edit: This site has been running fine for a month now and just now blew up after adding the text widget and adding the Twitter HTML.

Edit 2: I found the offending JavaScript in the wp_options (widget_text) and removed it but am still receiving the same error listing on the admin page.

3 Answers
3

ON DUPLICATE KEY UPDATE is one of several MySQL-specific things used by WP. Best I’m aware there is no equivalent in SQL-Server. You’ll get a syntax error no matter unless you regexp_replace() every query sent to the DB server in order to rewrite the SQL as needed for your specific engine.

Leave a Reply

Your email address will not be published. Required fields are marked *