WordPress.org

Ready to get started?Download WordPress

Forums

Back End Instructions
[resolved] Warning: Missing argument (12 posts)

  1. angutir
    Member
    Posted 1 year ago #

    In "edit.php?post_type=instructions" this warning:

    Warning: Missing argument 1 for plugin_dir_url(), called in /expert/htwebs/www4/ftplagale/www.domain.com/wp-content/plugins/back-end-instructions/instructions.php on line 601 and defined in /expert/htwebs/www4/ftplagale/www.domain.com/wp-includes/plugin.php on line 599

    http://wordpress.org/extend/plugins/back-end-instructions/

  2. Doodlebee
    Member
    Plugin Author

    Posted 1 year ago #

    Well, this is only a warning, so it doesn't affect how the plugin works. However, if you want to fix it, you can open up instructions.php, and change line 601 from this:

    $path = plugin_dir_url();

    to this:

    $path = plugin_dir_url(__FILE__);

    Alternatively, you can just shut off error messages in your WordPress install.

    I can't replicate this issue, though - so I'm not 100% sure that will work.

  3. angutir
    Member
    Posted 1 year ago #

    Thank you, I'll leave it as it is now, does not bother me. :)

    Good work! good plugin!

  4. Hugh
    Member
    Posted 1 year ago #

    @angutir, What plugins are you using because I have the same warning...

  5. Doodlebee
    Member
    Plugin Author

    Posted 1 year ago #

    Hugh, if you have the same warning, just setting the line:

    define('WP_DEBUG', false);

    in your wp-config.php file should solve the problem.

  6. Hugh
    Member
    Posted 1 year ago #

    actually it was showing up, even though define('WP_DEBUG', false); was set to false.

  7. Doodlebee
    Member
    Plugin Author

    Posted 1 year ago #

    Well your server settings could also be set to show notices and warning messages. (The WP_DEBUG setting is only for WordPress, not the entire server.) So if it's still showing, that's probably what it is.

    You're not stating *exactly* what your message is, Hugh - and I'm wondering if the message is even related to my plugin (since you asked "what plugin are you using?" - this is the board for *my* plugin, and as I stated above, I can't replicate this, even with my error_reporting turned on). It would be helpful to know what messages you're getting, since I can't see the issue myself.

  8. Hugh
    Member
    Posted 1 year ago #

    Actually the warning text goes away if I deactivate the plugin... I figured that I could just implement the features as a custom content type and do no front end theming.... conceptually the content is supposed to only be accessed through the admin pannel anyway...

    Here is the error I get (personal info replace with ~), which happens to be exactly the same as cited above:

    Warning: Missing argument 1 for plugin_dir_url(), called in /home/~/wordpress/wp-content/plugins/back-end-instructions/instructions.php on line 601 and defined in /home/~/wordpress/wp-includes/plugin.php on line 599

    I was asking @angutir which plugins they were using because it is logical that there could be a plugin conflict between your plugin and another plugin. So, in an effort to compare plugin sets we are using, I was asking "what plugins are they using?"

    The error only shows up on the admin page for your plugin. wordpress/wp-admin/edit.php?post_type=instructions

    Is it a variable name conflict?

  9. angutir
    Member
    Posted 1 year ago #

    Basic Google Maps Placemarks
    Google XML Sitemaps
    contact form 7
    And the theme Daisho

    And the warning it is the same, but as the plugin author say "it doesn't affect how the plugin works" i don't try to fix it because doesn't bother me.

  10. Hugh
    Member
    Posted 1 year ago #

    Yea, I am not using any of those plugins. I wonder if it is an incomplete array or syntax based issue based on the the part of the warning saying "Missing argument 1"... of course I have not looked the code for myself

  11. Doodlebee
    Member
    Plugin Author

    Posted 1 year ago #

    Again, Hugh, as stated above, it's a warning, not an error, so it doesn't affect how the plugin works. And, per the solution I provided above:

    you can open up instructions.php, and change line 601 from this:

    $path = plugin_dir_url();

    to this:

    $path = plugin_dir_url(__FILE__);

    That *should* fix it.

  12. webbushka
    Member
    Posted 1 year ago #

    That does work. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic