1

I'm desperate. I have a site with 2 databases, staging and production, and in staging messages set with drupal_set_messages() appear, but in production they don't. The codebase is the same. I tried switching database settings on the same codebase and the behavior will change depending on the database. I have inherited the site so I'm not 100% familiar with its configuration.

My question is: is there anything on a database level that can block messages from showing? They appear in the admin area, but not in the rest of the website...

1
  • 1
    Welcome to Drupal Answers! I assume the theme used in both the cases is the same, isn't it?
    – avpaderno
    Commented Nov 20, 2015 at 18:51

2 Answers 2

2

Configuration > Development > Logging and errors has some settings on whether to display drupal messages or not. You might check to make sure that it is properly configured for your use case.

Path to config page: /admin/config/development/logging

1
  • I had already tried that, but there was no difference. I tried looking around, and MAYBE the problem is about one database lacking the user with ID = 0, which drupal uses for anonymous users. The session data isn't stored correctly, so messages don't persist in the $_SESSION variable. I'm not sure and I will test this on monday at work, but I'm hopeful this is the problem. Commented Nov 21, 2015 at 12:04
0

Check your module page. There are modules such as Disable messages. Is any such module enabled on production.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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