• Everytime I login to the wp-login.php. I saw the two error lines, as follow:-

    ERROR: The username field is empty.
    ERROR: The password field is empty.

    How to solve it. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • I would like to know this too. Ever since I have upgraded to a newer version I have been seeing this annoying message and I don’t want my customers who use WordPress to see it either.

    I am interested in this too. I’m going to look at the code, but just wondered if anyone had encountered and/or addressed this.
    Thanks!

    In my case, the error messages were related to the install of the wp-contactform plugin in my WP installation. The plugin appears to be adding a value to the PHP $_POST array during the wp-login.php GET. Why? I assume it’s needed?

    The script /wp-login.php will issue the error messages in question if there is anything in the $_POST array and the userid/pass $_POST values are missing (it thinks the form was submitted w/ one of the required fields blank).

    In my case (WP v2.2.3), I needed to change the following in several locations in wp-login.php. I just made the change, so I’m thinking that corrected it. Will update this message if further problems arise:

    NOTE: use the following at your own risk/gain/demise ?? It worked for me… If you do change anything, make a backup of wp-login.php first, in case you need to revert:

    Ln 92:

    if ( $_POST) {

    changed to:

    if ($_POST[‘log’] || $_POST[‘pwd’]) {

    Ln 297:

    if ( $_POST) {

    changed to:

    if ( $_POST[‘log’] || $_POST[‘pwd’] ) {

    Ln 332:

    if ( $_POST && empty( $user_login ) )

    changed to:

    if ( ($_POST[‘log’] || $_POST[‘pwd’]) && empty( $user_login ) )

    Kalen

    (@kalen)

    so has everyone so far that has had this problem also had that plugin? i do have that plugin so i was going to try uninstalling it & refreshing wp-login maybe?

    The_Magistrate

    (@the_magistrate)

    briel: Thanks for the quick fix. I’ve been having this problem since upgrading to 2.3 and no one seemed to provide an answer. Hopefully we can get a more permanent fix to the WP-Contact plugin so our fixes aren’t destroyed during the next upgrade.

    Briel – Thanks for that. I tried your fix and it sorted the “ERROR: The username field is empty” but I’m still getting the password field error.

    I’m also running WP-Contact.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘username/password fileds’ is closed to new replies.