"There was a problem logging in"

A man looking at a tablet screen with very large fields for a username and password.

You thought you set up your site for CAS for the campus community, but your visitors are seeing "There was a problem logging, please contact the site administrator" even though they did log in and can see the content. What's going on here?

Why the message shows up in the first place

The Drupal application comes with its own built-in login system. If you decided to download and install Drupal for your own personal use, you would create a custom account name and password for your secure profile. Drupal looks for this information by default. Now, here at UC Davis, we use our Kerberos IDs and passwords to authenticate through CAS, and this requires the use of an extra module in Drupal that adds a different security doorway through which we SiteFarm users enter. Users have accounts on the site with their Kerberos information integrated directly into their profiles.

When Site Managers lock specific pages or their entire site behind CAS—the create an intranet or secure certain pages to the campus community—people without accounts on your site are logging in through that CAS doorway. Drupal's default login process becomes confused saying there was a problem because this person logged in, but no account for them already exists or has been generated during their login and it triggers the error message. This creates a confusing experience for visitors who realize, "Hey, why am I seeing this message when I'm clearly in the site successfully and can read the content."

Where are the messages coming from?

Behind the scenes, your site's Configuration has a section specifically for alert messages to notify your users of system processes, some of which can legitimately involve login errors. The issue is that every field related to your error messages says the exact same thing by default when your site is generated. How can you fix this in order to avoid confusing your visitors?

A screenshot of the Error Handling section of CAS Settings, showing the repetition of the same error message regardless of the error case.
There was a problem...with the same message being used in each field!

Modify your error message handling

Please note these steps require you to have a Site Manager role in your SiteFarm site.

  1. Navigate to Manage » Configuration » SiteFarm section » CAS Settings.
  2. Expand the Error Handling label.
  3. It's a suggestion to review these in general, but specifically, in this use case we want to look at Local account does not exist. Update this message to something more like: "You have authenticated through CAS to view this page" and at least the ribbon will serve as a confirmation. You could always extend it, if necessary, to include "If you are meant to have editing rights, but don't see them, contact us at {{enter contact info for your visitor}}".
  4. For possible future error handling, you may want to customize the other messages to at least have a better chance of determining what issue may have triggered the associated error message.
  5. Scroll to the bottom and click the Save configuration button to finish.

Category

Tags