WordPress.org

Forums

"Pages" added to default category upon upgrade (10 posts)

  1. BPartch
    Member
    Posted 8 years ago #

    I upgraded 2 of my blogs to WP 2.1 and notice that the pages have been added to the default category. So when I view the sitemap page the pages are listed under the "site-news" category (which is category 1 and was the original default cat).

    Any idea how to fix this so they are not under any category and are just pages again? Or am I missing something obvious?

  2. moshu
    Member
    Posted 8 years ago #

    I am afraid that must be a bug. Or a plugin incompatibility.
    Pages, actually, are and always were assigned to the default category of the blog - but strictly for internal technical reasons (so I was told by the gurus).

    So, I assume those Pages were always in that category, it just wasn't visible...

  3. BPartch
    Member
    Posted 8 years ago #

    Thanks moshu, I was thinking that might be a possibility, is there anything I can do to make them non visible again? It does not seem to be a major issue, though just a little weird. ;)

  4. moshu
    Member
    Posted 8 years ago #

    I've looked around in the database (not that I am a wizard or something...:)
    In the pre-2.1 versions the Pages were "flagged" in the wp_posts table (or whatever your prefix is) in the "post_status" column as - static.
    Now, they are marked as "page" in another column called "post_type" - which was there but empty in previous versions.

    Now my educated(?) guess is: if a plugin or script is looking to do something with Pages (exclude in a list or include or whatever) and the script is looking for "static" - it will not work. It will has to be re-written to look for the "page" in the "post_type" column of the DB.

    I know, this is not the best technical description but might give you, guys, a direction.
    (just a reminder: I am not a coder)

  5. mariogarcia
    Member
    Posted 8 years ago #

  6. moshu
    Member
    Posted 8 years ago #

    No, you didn't, mariogracia!
    This is a different issue, not related to post categories.

  7. Root
    Member
    Posted 8 years ago #

    Solutionated? :)

  8. moshu
    Member
    Posted 8 years ago #

    [for a non-native speaker is excusable... and maybe we shouldn't "grin" at those who struggle with the language]

  9. BPartch
    Member
    Posted 8 years ago #

    My issue with this was with the DDSitemapGen plug in by http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/

    I fixed this by adding "post_type" to the list on line: 881

    SELECT post_title, ID, post_status, post_type, cat_ID, post_date, cat_name

    and then on line: 887 I copied the line that was there created a new line below it pasted it and changed it to:

    AND post_type != 'page'

    Seems to have fixed the issue with this plug in I was having, so if anyone else is having the same issue and knows less about PHP than even I do here is a fix until it is updated by Dagon.

    Thanks again moshu, it was you that led me to this solution. :)

    Edit: I should add that this may not be an ideal solution, it just fixed the issue I was having. There may indeed be a better way.

    Ben

  10. mariogarcia
    Member
    Posted 8 years ago #

    Sorry, i didn't understood the issue well

Topic Closed

This topic has been closed to new replies.

About this Topic