Credentials fields are missing/hidden

Created on 11 December 2023, over 1 year ago

Problem/Motivation

It is not possible to set credentials from the form as the two fields for the username and password are missing.

Steps to reproduce

Navigate to admin/config/system/shield and scroll to Credentials

🐛 Bug report
Status

Active

Version

1.7

Component

Code

Created by

🇦🇺Australia pasan.gamage

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @pasan.gamage
  • 🇮🇳India sakthi_dev

    @pasangamage, It's not reproducible. Tried to reproduce in Drupal 9 and Shield 1.7. On the first page load itself able to see the user credentials field.

  • 🇦🇺Australia pasan.gamage

    Hi @sakthi_dev
    I forgot to mention, I'm using Drupal 10.
    Thanks.

  • 🇮🇳India sakthi_dev

    Hi @pasangamage, tried in Drupal 10 also it's not reproducible. Can you please verify whether it's reproducible in vanilla drupal10?

  • 🇩🇪Germany onfire84

    I tryed it on a fresh drupal 10 installation. Could also not reproduce the issue.

  • 🇮🇳India Sriparna Khatua

    I'm using Drupal 10.1.7 , I'm able to reproduce this issue. User and Password field is not showing.

  • Quick workaround - save config form and those fields will appear

  • 🇺🇸United States jaimerod Orange County, CA

    This workaround worked for me . Thanks!

  • First commit to issue fork.
  • 🇺🇸United States fizcs3 Omaha, Nebraska; USA

    Am having this issue as well... on Drupal 10.4.7 with Shield 8.x-1.8.

    On my end, I am not sure that this has anything to do with it, but:
    am also using config_ignore 8.x-3.3 to ignore import/export of shield.settings(.yml), since I have a multi-site and do not want the same configuration for shield on all sites.
    I swear at first, the user/pass fields were viewable. But later (maybe after a code push that didn't include a shield.settings.yml file to an already installed shield), the user/pass form fields were gone...
    Shield was disabled on a site, so I though ok, I will enable it and maybe the user/pass fields will return. When I clicked Enable Shield then Save, (of course) it immediately puts up a modal asking for user/pass, of which I never set... even pressing return and return would not allow me in, so I was locked out of the site!! I had to go and override the user/pass through settings.php to be able to set it to something and use that user/pass get back in.

    Regardless, there seems to be something going on with the persistency of shield settings in the database, especially the credential provider... I see that if a credential_provider isn't found then no user/pass fields are provided:
    https://git.drupalcode.org/project/shield/-/blame/8.x-1.x/src/Form/Shiel...

    I am thinking that since the credential provider form field dropdown defaults to Shield, then at least the respective Shield user/pass fields should also default to be used, if no credential provider was found.

    I've created MR!27 above with this simple change, which indeed is working for me to bring back the user/pass fields!
    Moving to Needs Review status, and changing version to affect not only 1.7 and 1.8 but the current dev branch.

  • 🇺🇸United States fizcs3 Omaha, Nebraska; USA

    fizcs3 changed the visibility of the branch 3407823-credentials-fields-are to hidden.

  • Pipeline finished with Success
    about 2 months ago
    Total: 165s
    #492651
Production build 0.71.5 2024