User login

Turning English off (using a custom English) in i18n breaks redirect on login

So WSF has a customization of the Drupal English, which we gave the prefix code "eng." This doesn't look as lovely as "en" but it works fine except for one place: when logging in and using redirection, you don't get to where you're headed. It somehow defaults to 'en' and directs you to a page with an en prefix, and because that's disabled, you get page not found.

This might be the cause, in i18n.module:

        // Worst case scenario: locale module not loaded, for cached pages, at least this won't break everything
        unset($languages); // There's some PHP bug: http://www.zend.com/zend/week/week98.php
        $languages['name'] = array('en' => 'English');

Changing line 399:

        $languages['name'] = array('eng' => 'English');

Seemed to fix things. Dirty hack, but it'll do for our specific site. If anyone else is using a customized English, or just has English disabled, this could help you too, until a proper fix gets into Internationalization (i18n) module or, possibly, Login Toboggan.

Resolution

Searched words: 
login toboggan localization login redirect sends to en instead of language drupal login toboggan i18n

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.