-1

I'm in the process of setting up a site to support 4 languages. One of the changes I made started to redirect /user to /[lang-code]/user, which in turn means Drupal's session cookie path now contains the language code. With the language code in the path, authenticated users do not stay logged in when they change languages.

Is there a simple way to avoid having Drupal add the language code to the cookie session path?

0

The problem in this case was solved by setting the cookie path in settings.php:

ini_set('session.cookie_path', '/subdir');

The site is running in a sub-directory (which may or may not have mattered), and the initial value used in the settings file has lacked the leading / (which mattered a great deal).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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