• Resolved lousam

    (@lousam)


    Following the upgrade of our hosts server to 5.0, I am no longer able to write to the database and get the following error when publishing a new post or page.

    WordPress database error Field ‘sidebar_title’ doesn’t have a default value for query INSERT INTO wp_posts (post_author,post_date,post_date_gmt,post_content,post_content_filtered,post_title,post_excerpt,post_status,post_type,comment_status,ping_status,post_password,post_name,to_ping,pinged,post_modified,post_modified_gmt,post_parent,menu_order,guid) VALUES (‘1′,’2009-05-21 11:26:05′,’2009-05-21 11:26:05′,’test’,”,’test’,”,’publish’,’post’,’open’,’open’,”,’test’,”,”,’2009-05-21 11:26:05′,’2009-05-21 11:26:05′,’0′,’0′,”) made by write_post, wp_write_post, wp_insert_post

    Any help would be MOST appreciated

Viewing 6 replies - 1 through 6 (of 6 total)
  • The field sidebar_title is not ‘native’ to the wp_posts table, so it makes me think you have a plugin that is causing that or a plugin that added that field to wp_posts.

    Thread Starter lousam

    (@lousam)

    Many thanks for your reply.

    I have upgraded to 2.7.1 in the (desperate) hope that it would help, and deactivated all plugins but unfortuntely the problem persists. If it is indeed due to a plugin adding a field, how would I go about correcting this without causing further problems?
    Everything was working fine, until the server upgrade yesterday.

    Disabling plugins doesn’t mean it will remove extra columns created in database tables it may have modified…

    If that’s the problem the solution is to manually remove them..

    If you have no idea what i’m talking about then i’m not sure i’d suggest you go fiddling with the database…

    I won’t be resposible if you decide to play with the database.

    Personal note: This is purposely why i avoid plugins that modify existing WordPress database tables (done by manually checking the code or database on a local test install).

    To get rid of a field (or row) in a database table, in phpMyAdmin access that table (wp_posts) and then under the Structure tab, you can delete that field.

    Might want to make sure you have a database backup before attempting such a thing.

    Does the de-activate plugin hook allow dropping or removing fields?…

    I’d assume it does, so i suppose my question now is why do plugin authors not account for this, especially when they’re hooking into existing tables.

    It’s not really a question though.. ?? …perhaps more a statement, lol..

    Thread Starter lousam

    (@lousam)

    Thanks for your suggestions and help. Made the column allow ‘null’ and it worked. Problem solved!! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Database error after MySQL upgrade (5.0)’ is closed to new replies.