WordPress.org

Ready to get started?Download WordPress

Forums

invalid argument in plugin.php (8 posts)

  1. bcaplan
    Member
    Posted 7 years ago #

    A bit of background for http://www.digimediafinance.com:

    - Originally was adding categories to each post, that became cumbersome.
    - Now using Simpletagging plugin, seems to work fine
    - today I deleted the old categories as I intend to create a new category structure. Using wp-admin, I removed all but blogroll and uncategorized.
    - edited the name and desctiption field for Uncategorized to "digimediafinance/digimediafinance" as I want this to be the top of a hierarchy of categories

    Now I notice that when I go to the categories page in wp-admin I get this error in my server logf file:

    PHP Warning:  Invalid argument supplied for foreach() in /home/www_digimediafinance_com/public_html/wp-includes/plugin.php on line 37, referer: http://www.digimediafinance.com/wp-admin/categories.php

    If I add a new category, I get the same error and the page then displays as blank.

    I tried changing the Category name back to Uncategorized, and the description back to blank, but I still get the same error.

    Checking my log files, this error has never occured before.

    Sys config info: self hosted on Centos4.3, MySQL version 4.1.20 blah blah blah.

    Any tips or ideas on how to get this working again?

    Thanks! Barry

  2. bcaplan
    Member
    Posted 7 years ago #

    hmm, the full error mesage didn't display above, let me try again:

    (slightly edited for formatting)

    PHP Warning:  Invalid argument supplied for foreach()
    in wp-includes/plugin.php on line 37, referer:
    http://www.digimediafinance.com/wp-admin/categories.php
  3. bcaplan
    Member
    Posted 7 years ago #

    OK, a bit more info: I notice that in table wp_posts, the post_category field is set to 0 for all my posts. Which I think would be fine, except their is not cat_ID 0 in wp_categories table, only 1 (Uncategorized) and 54 (Blogroll).

    Could this be the issue?

    If so, which table is wrong?

    Thanks!

    Barry

  4. bcaplan
    Member
    Posted 7 years ago #

    No, that doesn't seem to be it either - just looked at a scratch wp database I had laying around on a differnt domain and it is the same wrt category ids as mentioned in the previous post

  5. bcaplan
    Member
    Posted 7 years ago #

    Oh yeah the line in question is this one (I haven't modified this file at all):

    foreach ( (array) $wp_filter[$tag] as $priority => $functions ) {

    It is found in funciton apply_filters

  6. bcaplan
    Member
    Posted 7 years ago #

    fwiw, I just upgraded from 2.1 to 2.1.2 (latest) and still the same issues

  7. bcaplan
    Member
    Posted 7 years ago #

    Hmm more strangeness but sataarting to look better. I added a caztegory via the Category box on the write post page. The first one left me with the same result. Then I edited (directly in the db) the Uncategorized category to have a different name. Then I added 2 more categories inteh write post form, and now I can display categories in the "manage" page of wp-admin.

    Not only that I am not getting the errors in the apache error log anymore!

    We will see what happens when I try to manage the categories and give them the desired hierarchy.

  8. bcaplan
    Member
    Posted 7 years ago #

    Well that seemed to work OK. I guess I am happy now, as behavior is what I expect, and I have upgraded to latest.

    Anyone have any idea what happened, just for the record?

    If not, I hope this thread helps someone who might have the same issue someday (although I sincelerely hope you don't have the same issue :)

    Best,

    Barry

Topic Closed

This topic has been closed to new replies.

About this Topic