Support » Fixing WordPress » Small Bug – Advanced Editing on New Post

  • Noticed that if I don’t have a category selected and click the Advanced Editing button for a new post, a bunch of errors are displayed at the bottom of the page (though the page still functions). If a category is checked prior to clicking the Advanced Editing button, no error is generated.

    The error is:
    PHP Warning: in_array(): Wrong datatype for second argument in d:\home\my_directory\cachingcentral_wp\wp-admin\admin-functions.php on line 41

    Looking at the code in admin-functions.php, it seems the issue has to do with selecting a category, though none is selected, OR it has to do with the “$default” category, which if it assuming it’s the one provided with WP, I’ve deleted that.

    Any way to resolve this error?

    Also, I noticed that if the category for a post is deleted (default post with default category), building the lists of posts, prior to deleting the default post with the base install, showed the same error.


Viewing 7 replies - 1 through 7 (of 7 total)
  • Also noted that on the Categories “tab” under Options, it states:
    Deleting a category does not delete posts from that category, it will just set them back to the default category .

    Is there a default category specified some place? I didn’t see it listed in the GUI but maybe in the database… I’ll have to check that.

    The problem should be dealt with in WordPress 1.5, in that it will force a post into the default category if one is not selected.

    Default category in 1.2.x is the first one (Cat ID 1). 1.5 is supposed to allow you to change the default.

    So is there a place to change the default category? ‘Cause I can’t find a default change option.

    Would it work to change my default cat. name to an existing category, then delete the other category, forcing all of the entries to move to the default? Make sense?

    In WP 1.5 it is Options | Writing

    that’s what I thought… but when I changed the default there (including the default in the e-mail section), when I go to ‘manage’ ‘categories’, it still list the wrong one. Try it… is it just me? I emptied my cache and everything.

    As long as you have multiple categories, you will have a choice in a drop down menu on the default categories choice. Be sure you update the page using the update options button (WP1.5)

    I just changed my default and returned it to the original without problems.

    I’m not sure what’s going on here. I went to my ‘Options/Write’ page and the default category was the one I selected yesterday. Good to go there. BUT, then I went to ‘Manage/Categories’ and there is lists a different category as my default, and it doesn’t change as I switch defaults. Is a variable not getting passed in maybe? I wrote a test entry with no category selected, and it did post to my correct default category, so it just looks like the problem is isolated in the ‘Manage/Categories’ area. Could someone else try this and see if it’s just me or not? Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Small Bug – Advanced Editing on New Post’ is closed to new replies.