Can't login to Portal after pushing code to pantheon

Not applicable

Randomly after pushing code changes to the portal hosted on pantheon, the site locks out all users.

The only way to gain access is to authenticate with Apigee or roll back the changes to a previous backup.

When the code is run locally, using a wamp server, the users can login just fine.

What would cause this issue? How can it be resolved?

Solved Solved
0 5 152
1 ACCEPTED SOLUTION

Not applicable

There was a line of javascript in our theme that disabled needed form elements.

$('input[name="form_build_id"], input[name="form_token"], input[name="form_id"]').detach().appendTo('#custom-search form');

I had to reenable these elements using clone instead of detach to fix the issue.

$('input[name="form_build_id"], input[name="form_token"], input[name="form_id"]').clone().appendTo('#custom-search form');

Though it is unlikely anyone will reproduce this error, I thought sharing the fix would help others avoid the same issue.

**AVOID TAMPERING WITH FORM ELEMENTS IN YOUR THEMES/MODULES THIS CAN DISABLE FUNCTIONALITY ACROSS THE SITE IN UNEXPECTED WAYS**

Thank you for your time, Mitchel

View solution in original post

5 REPLIES 5

@Mitchel Skees , Can you share a screenshot that explains "site locks out" ? Do you see an error while logging in ? Do you see 404 not found page when you click on sign in button ?

Not applicable

@Anil Sagar, there is no error message. It just shows the login screen. The credential fields reset but that is the only indication anything has changed.

When I try the forgot password link, it does the same thing. The email field resets but no email is sent.

@Mitchel Skees , I see it as a customization issue. If the issue is reproducible, I can check what's going on. Please keep me posted if issue is reproducible.

Not applicable

There was a line of javascript in our theme that disabled needed form elements.

$('input[name="form_build_id"], input[name="form_token"], input[name="form_id"]').detach().appendTo('#custom-search form');

I had to reenable these elements using clone instead of detach to fix the issue.

$('input[name="form_build_id"], input[name="form_token"], input[name="form_id"]').clone().appendTo('#custom-search form');

Though it is unlikely anyone will reproduce this error, I thought sharing the fix would help others avoid the same issue.

**AVOID TAMPERING WITH FORM ELEMENTS IN YOUR THEMES/MODULES THIS CAN DISABLE FUNCTIONALITY ACROSS THE SITE IN UNEXPECTED WAYS**

Thank you for your time, Mitchel

Awesome @Mitchel Skees , Glad you figured out the issue quickly & Thank you for sharing same community. I am sure, It will be helpful for the others.