SimpleModal – Login: “Error: All fields are required” message even on a successful registration

first question here so if there is anything wrong please correct me.

I know it is not good practice to use plugins that are not updated constantly, but this plugin has always helped me in other projects and is very useful on a daily basis.

Anyway, I’m facing a strange problem, I implemented this plugin on a website recently and it works correctly, however it presents this error message even when the user registration is done correctly:

  • Error: All fields are required

I put the login link in the menu using the following function:

add_filter( 'wp_nav_menu_items', 'wti_loginout_menu_link', 10, 2 );

function wti_loginout_menu_link( $items, $args ) {
   if ($args->theme_location == 'sub-nav-menu') {
      if (is_user_logged_in()) {
         $items .= '<li class="log-out-btn"><a href="'. wp_logout_url() .'"><i class="fa fa-sign-out" aria-hidden="true"></i> '. __("Sair") .'</a></li>';
      } else {
         $items .= '<li class="log-in-btn"><a href="'. wp_login_url(get_permalink()) .'" class="simplemodal-login"><i class="fa fa-sign-in" aria-hidden="true"></i> '. __("Entrar") .'</a></li>';
      }
   }
   return $items;
}

This plugin creates the modal using the simplemodal-login class in a link, so this part is very simple.

My doubts are these:

  • Why does it display the error message, even when the registration is done correctly?

  • How can I debug these messages?

Thanks in advance for the attention.

And sorry if my English is not very good, I’m from Brazil and it’s been a while since I’ve practiced.

Read more here: SimpleModal – Login: “Error: All fields are required” message even on a successful registration

Leave a Reply

Your email address will not be published. Required fields are marked *