We didn't touch our templates and the "lost password" form is no more rendering. here is my template code working fine with $login_form.

<div id="login-container">
    <div class="login-hint">
      <p><?php echo t('Pour vous connecter, veuillez indiquer votre adresse email (login) et votre mot de passe')?></p>
    </div>
    <?php
      $login_form['name']['#attributes']['placeholder'] = t('Login');
      $login_form['pass']['#attributes']['placeholder'] = t('Mot de passe');
      print drupal_render($login_form); 
    ?>
</div>
<div id="password-container">
    <div class="pass-reset-hint"><?php echo t('Indiquez votre adresse e-mail de connexion, et vous recevrez un nouveau mot de passe')?></div>
    <?php 
      $reset_pass_form['name']['#attributes']['placeholder'] = t('Addresse e-mail');
      //print drupal_render(drupal_get_form('user_pass'));
      print drupal_render($reset_pass_form); 
    ?>
</div>

I also tried directly the following :

print drupal_render(drupal_get_form('user_pass'));

Here is the result of print_r($reset_pass_form); so, the it exists :

Array
(
    [#form_id] => user_pass
    [#type] => form
    [#build_id] => form-na8Ow30ky69azZcTP7vQ_BijkXKobSuPFtmsajrNveM
    [form_build_id] => Array
        (
            [#type] => hidden
            [#value] => form-na8Ow30ky69azZcTP7vQ_BijkXKobSuPFtmsajrNveM
            [#id] => form-na8Ow30ky69azZcTP7vQ_BijkXKobSuPFtmsajrNveM
            [#name] => form_build_id
            [#parents] => Array
                (
                    [0] => form_build_id
                )

            [#input] => 1
            [#process] => Array
                (
                    [0] => ajax_process_form
                )

            [#theme] => hidden
            [#defaults_loaded] => 1
            [#tree] => 
            [#array_parents] => Array
                (
                    [0] => form_build_id
                )

            [#weight] => 0
            [#processed] => 1
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#ajax_processed] => 
            [#sorted] => 1
        )

    [form_id] => Array
        (
            [#type] => hidden
            [#value] => user_pass
            [#id] => edit-user-pass
            [#parents] => Array
                (
                    [0] => form_id
                )

            [#input] => 1
            [#process] => Array
                (
                    [0] => ajax_process_form
                )

            [#theme] => hidden
            [#defaults_loaded] => 1
            [#tree] => 
            [#array_parents] => Array
                (
                    [0] => form_id
                )

            [#weight] => 0.001
            [#processed] => 1
            [#required] => 
            [#attributes] => Array
                (
                )

            [#title_display] => before
            [#name] => form_id
            [#ajax_processed] => 
            [#sorted] => 1
        )

    [#id] => user-pass
    [#method] => post
    [#action] => /login
    [#theme_wrappers] => Array
        (
            [0] => form
        )

    [#tree] => 
    [#parents] => Array
        (
        )

    [#validate] => Array
        (
        )

    [#submit] => Array
        (
        )

    [#theme] => Array
        (
            [0] => user_pass
        )

    [#processed] => 
    [#defaults_loaded] => 1
    [#required] => 
    [#attributes] => Array
        (
        )

    [#title_display] => before
    [#array_parents] => Array
        (
        )

    [#sorted] => 1
    [#attached] => Array
        (
            [js] => Array
                (
                    [0] => Array
                        (
                            [type] => setting
                            [data] => Array
                                (
                                    [urlIsAjaxTrusted] => Array
                                        (
                                            [/login] => 1
                                        )

                                )

                        )

                )

        )

)

Is it an update issue or anonymous user rights issue?

I'm on 7.58

Can you help me?

actually the user/password is accessible for everyone (unless some custom code changes this behaviour)

if the form elements are present in DOM but are not displayed, i would check if there is some custom css that hides it somehow.

  • I was thinking of the CSS display:noneor soething like that bue, if I look for source code (with Firebug console) there's nothing! i.imgur.com/RjXFHdX.png – Meloman Nov 23 at 10:27
  • Here is the only code I have in <form action="/login" method="post" id="user-pass--2" accept-charset="UTF-8"><div><input type="hidden" name="form_build_id" value="form-q5vjHEzfpleFhK4V3fuhxDpK8W-zH2zy6H8B0kTHOOU" /> <input type="hidden" name="form_id" value="user_pass" /> </div></form> – Meloman Nov 23 at 12:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.