WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problems with Categories (7 posts)

  1. LisaHartjes
    Member
    Posted 8 years ago #

    I'm having problems with the categories. When I am writing a post, the default category I have set up is not checked, and if I forget to check one, I get the following error:

    WordPress database error: [Unknown column 'none' in 'field list']
    INSERT INTO wp_post2cat (post_id, category_id) VALUES (86, none)

    Warning: Cannot modify header information - headers already sent by (output started at /home/evilgm/public_html/wp-includes/wp-db.php:102) in /home/evilgm/public_html/wp-admin/post.php on line 60

    In addition, when I publish a new page, I get the following error:

    WordPress database error: [Unknown column 'none' in 'field list']
    INSERT INTO wp_post2cat (post_id, category_id) VALUES (87, none)

    Warning: Cannot modify header information - headers already sent by (output started at /home/evilgm/public_html/wp-includes/wp-db.php:102) in /home/evilgm/public_html/wp-admin/post.php on line 60

    I don't know if this is a coincidence, but the errors started happening after I installed and activated the WP Shopping Cart plugin by Thomas Howard. I actually started noticing other problems - a werid conflict between the Giraffe2 theme and the shopping cart plug-in, but that's another story.

    Will I need to reinstall WP, or is there something else I can do?

  2. ladydelaluna
    Member
    Posted 8 years ago #

    http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent

    that link might help with the "headers already sent" error - it's basically a matter of deleting some white space at the end of a specific file (in this case appears to be post.php)

    try fixing that one first, and see if the other one resolves itself after that? i've never seen the default category UNchecked before, so you might be right in that it may be because of one or more of those plugins you have. try deactivating them temporarily and see if it comes back, then activate them one by one to find the culprit.

  3. kenkam
    Member
    Posted 8 years ago #

    I am not sure if I agree with Ladydeluna. The headers are already sent, of course, since they are sent before the errors reach you via your browser [ie. WordPress database error: [Unknown column 'none' in 'field list']
    INSERT INTO wp_post2cat (post_id, category_id) VALUES (87, none)]

    You shouldn't worry about this. What you should do is fall back to your original theme and turn off the shopping cart. If everything works then you won't have to re-install WordPress - unless you have overwritten some of the files.

    Like Ladydeluna says, disable your plugins and fall back to your original working theme. Everything works? Turn the plugin on. Still working? Try your theme.

  4. LisaHartjes
    Member
    Posted 8 years ago #

    Well, I'd already turned off the shopping cart, and was still having the problems. Turned off all the plug-ins I had on, still had the problem. I decided to check out the post.php file again. Turns out a ! got moved. Not sure how it got changed, as I didn't change it myself. I forgot to check the last time the file was saved, before I uploaded the corrected file, so I won't be able to track down when it happened.

    The default category still wasn't checked, so I went back in, checked the settings on the Writing tab under Options, then saved it, and the default is checked again.

    Thsnks for all your help.

  5. pckujawa
    Member
    Posted 8 years ago #

    I also came across this error. For me, it would appear when I tried to write or update either a post or a Page. LisaHartjes solution:

    The default category still wasn't checked, so I went back in, checked the settings on the Writing tab under Options, then saved it, and the default is checked again.

    worked for me, although I don't know why it was affecting Pages as well as posts. My advice to anyone seeing this error is to write a new post, and see if any of the categories are checked by default. If not, that's your problem and the solution is above. I, unlike LisaHartjes, didn't need to change any ! in post.php, and I'm not even sure where she made that change.

  6. moshu
    Member
    Posted 8 years ago #

    I don't know why it was affecting Pages as well as posts

    Because although practically Pages do NOT have category, for internal technical reasons they are always assigned to the default category.

  7. eplanit
    Member
    Posted 7 years ago #

    Just making sure the default category was selected (not sure why it deselected in the first place) did it for me! I did not have to modify any php or anything. Thanks for the help guys!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags