Posts Tagged ‘Blog’
Text Widget Error on Wordpress 2.7
March 20th, 2009 6 Comments Posted in Wordpress
Today, I try to add Yahoo Pingbox at one of my blog but after I hit save button, I got this error.
Warning: array_keys() [function.array-keys]: The first argument should be an array in /home1/*****/public_html/*******/wp-includes/widgets.php on line 1045

I use Wordpress 2.7 and I add one text widget in my sidebar. When I try to save it, I get that error message and my recent widget doesn’t show. But that’s not all. All of my other text widget also dissapear from frontpage and from admin page. I believe that what gives me this error is something that I wrote in textarea. I can’t edit it because I can’t find it in my sidebar. It says that I use 5 widget and only 2 that are on sidebar.
To correct this problem, I try to use phpmyadmin from my hosting cpanel.
Maybe this can be solution for you when you have this error too.
- Go to your phpmyadmin. If you are using cpanel hosting, you can start from database section.
- In phpmyadmin, select database that used by your wordpress.
- Go to search tab and type “widget_text”. The search result will return one table named “wp_option”. Click this table and see returned row.
or you can use sql code directly.Here’s the sql code:
SELECT *
FROM `your_database_name`.`wp_options`
WHERE (
`option_id` LIKE '%widget_text%'
OR `blog_id` LIKE '%widget_text%'
OR `option_name` LIKE CONVERT( _utf8 '%widget_text%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `option_value` LIKE CONVERT( _utf8 '%widget_text%'
USING latin1 )
COLLATE latin1_swedish_ci
OR `autoload` LIKE CONVERT( _utf8 '%widget_text%'
USING latin1 )
COLLATE latin1_swedish_ci
)
LIMIT 0 , 30
- Now after you find it. Click edit button. Copy and paste all text from ‘option_value’ field. It’s your backup. You will need it if you want to use the same value for your text widget. Oce you copy it, you can delete it.
- Now login to your wordpress administration page. Go to Appearance > Widget and you can add Text-widget again.



