WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error Message After Entering New Page.... (13 posts)

  1. pufftenticle
    Member
    Posted 7 years ago #

    I am entering new pages that are children to children. When I do, I get this error:

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

    Warning: Cannot modify header information - headers already sent by (output started at /homepages/0/d144193462/htdocs/texas-fire/blog/wp-includes/wp-db.php:104) in /homepages/0/d144193462/htdocs/texas-fire/blog/wp-includes/pluggable-functions.php on line 272

    (i don't know what a 'backtick' is, sorry)

    Strange thing is that the page is still created, and works just fine. Here is the site for reference. The pages I am dealing with are under the 'departments' link, in Region 7.

    Thanks !

  2. spencerp
    Member
    Posted 7 years ago #

    Well, for the "headers already sent" message, read this.

    spencerp

  3. pufftenticle
    Member
    Posted 7 years ago #

    i went thru the post that was suggested, followed the guidance on taking out the 'whitespace', but that didn't fix it.

    it only happens when i create new pages that are children of children. doesn't happen when pages are updated or when new posts are placed in. does that make any difference ?

  4. spencerp
    Member
    Posted 7 years ago #

    From that error message there, it appears that some how you have created an extra "column" on that database table, for "none"..in 'field list'.

    Did you make some other "field" maybe, and it's not specified for anything specific, or doing anything maybe? Or perhaps a plugin was activated then, and it's table field is still lingering..?

    I'm not really a database professional, so.. maybe someone will be able to help better on this.. ;)

    spencerp

  5. Chris_K
    Member
    Posted 7 years ago #

    the "none" is the value attempted to be set for category.

    While Pages don't have categories in the real world, in the db they get the default category assigned to them.

    Does the blog have a category set as "default"?

  6. spencerp
    Member
    Posted 7 years ago #

    Awesome! Thanks Handy.. ;) I knew there was a database professional around here some where.. lol! ;) I'll have to remember this for later.. everyone is always learning, including me.. ;)

    spencerp

  7. pufftenticle
    Member
    Posted 7 years ago #

    i wond'd about that. initially yes, there was a default. but after about a month of building, that default suddenly stopped being automaticaly 'checked'. it was actually a cool thing for me because of a whole host of other things, but not if it creates this problem.

    i have only used plugins that i have used on other sites with 100% success. BUT (big smile) i did want there to be extra posts AFTER the initial blurbs that were just headlines (see the bottom of this page).

    i did that by inputting this code (that i found here on the forum) for that:

    <?php query_posts('posts_per_page=4'); ?>

    before the loop, and

    <?php
    $posts = get_posts('numberposts=10&offset=4');
    foreach ($posts as $post) :
    ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></li>
    <?php
    endforeach;
    ?>

    at the end of the loop

    is that the culprit ? and if so how can i unbreak it ?

  8. Chris_K
    Member
    Posted 7 years ago #

    I don't think that would be the culprit, unless I'm missing something obvious (which happens all too often!).

    If you visit your Manage -> Categories page and look at the right most column, do any of them say "Default" instead of the usual "delete" link?

  9. pufftenticle
    Member
    Posted 7 years ago #

    hmmm. no. they all say delete. how did i do that ?

  10. Chris_K
    Member
    Posted 7 years ago #

    Boy, that's a really good question. I didn't think it was possible to not have a category tagged as default...

    If you're comfy in phpMyAdmin (or a similar db tool), check out your wp_options table. You should have a record in there where option_name is "default_category" and option_value is the id of a category that exists in wp_categories. If that ID is bogus, I'd update it to one that's real.

  11. Kafkaesqui

    Posted 7 years ago #

    First check on the 'Default post category' under Options > Writing. If you can set it there...

  12. pufftenticle
    Member
    Posted 7 years ago #

    i check'd Kaf's thing first and that worked ! i will keep a copy of this for future !

    you guys are the wind beneath my wings !

  13. spencerp
    Member
    Posted 7 years ago #

    Glad to hear you got it fixed now, can the status be changed to [Resolved] now?

    spencerp

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.