Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor redsand

    (@redsand)

    Hi master412160,

    I’ve looked into that one extensively. There’s actually no bug in the plugin. (At least not from what I can tell…after a LOT of testing, researching, etc.) I’ve checked that particular notice with DEBUG on and nothing causes it to go away. I honestly think there must be some kind of strange quirk or bug with WordPress because the code that calls that function is literally copied and pasted from the WordPress Codex. In a few places in the plugin I have to verify user capabilities. The code used in the plugin is current_user_can('moderate_comments') and current_user_can('manage_options') and there hasn’t been reference to user levels as of a long time ago.

    The example given in the WordPress Codex is :

    if ( current_user_can('moderate_comments') ) {
     echo 'The current user can moderate comments';
    }

    so you can see it’s exactly the same usage.

    The codex entries for the function “current_user_can()” is:
    https://codex.www.ads-software.com/Function_Reference/current_user_can
    … and User Roles and Capabilities is:
    https://codex.www.ads-software.com/Roles_and_Capabilities

    I’ve pretty much memorized those pages inside and out, backwards and forwards, and still can’t see anything would cause it.

    All I can do on this one is recommend not running a production site with DEBUG on. But that’s completely your call. ?? If you (or anyone else) happen to find a solution I don’t know about, I’m open to suggestions.

    – Scott

    Thread Starter master412160

    (@master412160)

    I see good and detailed explanation you gave me.

    Did you bring this up with any other developer? To see if they maybe spot what is causing or you can submit it as a possible core bug to the trac here on wordpress?

    Plugin Contributor redsand

    (@redsand)

    Thanks. I haven’t yet, but it’s definitely on the To Do list. I’m going to do some more testing first. I like to be able to recreate a problem consistently before I submit it as a bug. I know what it’s like trying to diagnose a problem that’s not consistent…it’s like shooting in the dark. The WP Devs have enough work to do already so I just want to have more info to give them first.

    Plugin Contributor redsand

    (@redsand)

    One thing I forgot to mention…when I was testing, I did a couple things to prove a point…I copied and pasted the exact implementations of the code from the WordPress core itself into the plugin. Still happened. Then, I went further and even created a test version of the plugin that had no references whatsoever to the “current_user_can()” function at all. It still happened. So there definitely is something else going on. I’m wondering if there is a WordPress function that is incorrectly calling it. I’m going to look into the WP Core files to look into it.

    Thread Starter master412160

    (@master412160)

    It seems so. Often enough people tend to look over things like this with their own creation. A new set of eyes may resolve this for you.

    I don’t mean to offend you its like when you write a document you sometimes read over typos everytime you re-read it until you let someone else read it and they spot it for you. ??

    Also good luck! Hopefully you’ll find your answer there somewhere.

    Plugin Contributor redsand

    (@redsand)

    Trust me you don’t offend me at all…I really appreciate your feedback and observations.

    I appreciate feedback and insight from all who are willing to offer it. I agree…when it’s your own creation, its all too easy to overlook things.

    Thank you! I’m sure I will, it just might take a little bit. Have a good one. ??

    Thread Starter master412160

    (@master412160)

    Have you had any luck no this?

    Plugin Contributor redsand

    (@redsand)

    I applied a workaround so it shouldn’t show up anymore but I haven’t been able to figure out what exactly is causing it yet.

    Thread Starter master412160

    (@master412160)

    Is tis workaround present in the latest version?

    Plugin Contributor redsand

    (@redsand)

    Yes it is.

    Thread Starter master412160

    (@master412160)

    It still displays for me though…

    Plugin Contributor redsand

    (@redsand)

    Are you testing on 127.0.0.1?

    Thread Starter master412160

    (@master412160)

    Version 1.3 it says in my plugin list.

    Plugin Contributor redsand

    (@redsand)

    Yes, it would definitely say it’s in your plugin list. I was asking about the server you’re testing it on….is it an internal server (127.0.0.1, ie. your computer) or a live production website? (www.somewebsite.com)

    Thread Starter master412160

    (@master412160)

    live production website.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘1 argument that needs patching’ is closed to new replies.