Incompatibility/redirect loops with multilingual

Created on 27 December 2013, about 11 years ago
Updated 26 November 2024, about 2 months ago

When locale module is enabled and different languages are specified using the 'domain' method of language selection the securepages module causes redirect loops.

Steps to reproduce:

  • Vanilla install
  • Enable locale module
  • Create new language (eg Spanish)
  • Set up languages ensuring 'Language domain is filled:
  • admin/config/regional/language/edit/en eg http://en.localhost
  • admin/config/regional/language/edit/es eg http://es.localhost
  • NB. protocol (http/https) must be included.
  • Enable and set up securepages.

Any redirect now will get stuck redirecting between securepages desiring to switch the user to the https page, whereas Drupal's locale module will run locale_language_url_rewrite_url() from locale_url_outbound_alter() (hook_url_outbound_alter()) called from url() which switches the user right back to the http://en.localhost link entered earlier.

Whilst the patch attached presumes the 'secure' link starts with https:// (potentially ignoring what the user has entered for their secure URL), it does fix the redirect loop issue.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia adammalone Sydney/Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024