Forums

[resolved] [Plugin: WP Super Cache] Warning message and No Favorite Menu in admin header (9 posts)

  1. nicogo
    Member
    Posted 10 months ago #

    When I log in with an admin account, I have the Favorites menu with the new "Delete Cache" link added in the last release 0.8.8

    When I log in with an non admin account, I have no Favorites actions in the header but I can read a warning message :
    Warning: Invalid argument supplied for foreach() in [...]/wp-admin/includes/template.php on line 3172

    If I comment the line 1284 below :
    add_filter( 'favorite_actions', 'wp_cache_favorite_action' );
    in the file './plugins/wp-super-cache/wp-cache.php'
    Warning message disappears for non admin user.

    Do you have the same behaviour on your wordpress with the release 0.8.8 ?

    Thanks

  2. Ajay
    Member
    Posted 10 months ago #

    I see the same problem in 0.8.8 as well.

    I too have commented out the lines.

    Ajay

  3. lont
    Member
    Posted 10 months ago #

    I have the same problem.

  4. donncha
    Member
    Posted 10 months ago #

    Thanks, I'll fix that.

  5. saraar
    Member
    Posted 10 months ago #

    I too have the same problem. I will try your fix.

  6. askmetoo
    Member
    Posted 10 months ago #

    that same

  7. aaroncampbell
    Member
    Posted 10 months ago #

    donncha:
    I just made lines 1275 & 1278 return $actions rather than false (since $actions needs to stay as an array). Alternatively, if you REALLY need it to force an empty actions (and you want to override anything some other plugin might be doing) you could return an empty array.

  8. donncha
    Member
    Posted 10 months ago #

    aaroncampbell - yeah, that's what I did in trunk a few days ago.

  9. aaroncampbell
    Member
    Posted 10 months ago #

    donncha - I see...it would be nice for some of my clients if you could release that so they can upgrade to it. All non-admin accounts get an ugly error in the admin header...it's not very professional looking.

    Thanks for being on top of this though.

Reply

You must log in to post.

About this Topic