WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nicogo
    Member
    Posted 5 years 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 5 years ago #

    I see the same problem in 0.8.8 as well.

    I too have commented out the lines.

    Ajay

  3. lont
    Member
    Posted 5 years ago #

    I have the same problem.

  4. Donncha O Caoimh
    Member
    Posted 5 years ago #

    Thanks, I'll fix that.

  5. saraar
    Member
    Posted 5 years ago #

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

  6. askmetoo
    Member
    Posted 5 years ago #

    that same

  7. Aaron D. Campbell
    Member
    Posted 5 years 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 O Caoimh
    Member
    Posted 5 years ago #

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

  9. Aaron D. Campbell
    Member
    Posted 5 years 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.

Topic Closed

This topic has been closed to new replies.

About this Topic