Hi everybody. I have a backdrop site on a shared hosting, and it's multilingual. It uses the following translation/internationalization modules:

  • Field Translations
  • Internationalization
  • Menu Translation
  • String Translation
  • Translation Redirect
  • Translation Sets
  • Content Translation
  • Language
  • Locale

I have different nodes and menu paths for each language, and each language is in a different path prefix. I'm using PHP 7.4 as I'm still working on migrating some other sites on the same host to Backdrop and they don't work on PHP 8 (yes, I know)

When I update from 1.31 to 1.32.0, the urls on the non-english version of the site return an error. I could not find the error details, as I had to quickly restore the site. I wish I could provide better ways to diagnose and repeat the issue.

Most helpful answers

After investigation, the problem turns out to be reproducible - when installing Global Redirect (even on a fresh install).

A core issue has been opened here: https://github.com/backdrop/backdrop-issues/issues/6972

Hi amilenkov,

no need to excuse, we all have day jobs. ;-)

Your thorough investigation is actually super helpful! Thank you so much for taking the time.

It has to do with the Global Redirect (contrib) module.

Now a question to ToniTen: do you also have Global Redirect enabled?

Comments

I tried to reproduce it on a local install through lando, and got the same error. 

Firefox gives me this error

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

  • This problem can sometimes be caused by disabling or refusing to accept cookies.

Checking the dev tools, I see that it gets stuck in a 301 redirect loop

I confirm that there is a problem with the update from 1.31 to 1.32.0. I tested with a site that has been working in two languages ​​for several years - Bulgarian and English, with Bulgarian without a suffix, and English using en. The verified Bulgarian page works normally:

https://darisgroup.bg/schetovodstvo

When trying to access the English page, an error is displayed:

https://darisgroup.bg/en/accounting

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.

https://darisgroup.bg/admin/reports/dblog

It shows the following: (I attach a screenshot). At the same time, there is no German language on the site???

I'm restoring from backup to 1.31.

Error due to rush to restore working site, here are the correct versions

Reverting to 1.31.1 still gave the same error. Actually I had a backup from 1.31.0 and updated to 1.31.1, but got the same error.

I deleted the core and database and reverted to backups from 1.31.0 and now the site works normally in Bulgarian and English.

Here is the data for the restored working configuration

Backdrop CMS:                   1.31.0
Installation profile:           standard
PHP version:                    8.2.29
Drupal 7 compatibility:         on
Database server:                10.6.23-MariaDB-log
Web server:                     Apache
jQuery version:                 1.12.4
jQuery UI version:              1.14.0
CKEditor 5 version: 44.3.0      Used in formats: Filtered HTML

Themes
======
Default theme:                  darisgroup (darisgroup) 1.31.0
Admin theme:                    Seven2* (seven2) 1.31.0
  ↳ base theme:                 ↳ Seven (seven) 1.31.0
                               *used when editing or creating content

Enabled modules
===============

Core
----
admin_bar                       1.31.0
block                           1.31.0
ckeditor5                       1.31.0
color                           1.31.0
config                          1.31.0
contact                         1.31.0
contextual                      1.31.0
dashboard                       1.31.0
date                            1.31.0
dblog                           1.31.0
email                           1.31.0
entity                          1.31.0
entityreference                 1.31.0
field                           1.31.0
field_sql_storage               1.31.0
field_ui                        1.31.0
file                            1.31.0
filter                          1.31.0
image                           1.31.0
installer                       1.31.0
language                        1.31.0
layout                          1.31.0
link                            1.31.0
list                            1.31.0
locale                          1.31.0
menu                            1.31.0
node                            1.31.0
number                          1.31.0
options                         1.31.0
path                            1.31.0
redirect                        1.31.0
simpletest                      1.31.0
syslog                          1.31.0
system                          1.31.0
taxonomy                        1.31.0
telemetry                       1.31.0
text                            1.31.0
translation                     1.31.0
update                          1.31.0
user                            1.31.0
views                           1.31.0
views_ui                        1.31.0

Contrib
-------
active_tags                     1.x-2.0.0
antibot                         1.x-1.2.1
back_to_top                     1.x-2.1.3
backup_migrate                  1.x-1.0.30
bueditor                        1.x-2.4
colorbox                        1.x-2.17.4
field_multiple_limit            1.x-1.0.4
flexslider                      1.x-2.0.1
flexslider_fields               1.x-2.0.1
flexslider_views                1.x-2.0.1
frontpage_multilingual          1.x-1.0.0
globalredirect                  1.x-1.6.0
html5_upload                    1.x-1.1.3
i18n                            1.x-1.0.0-beta6
i18n_contact                    1.x-1.0.0-beta6
i18n_field                      1.x-1.0.0-beta6
i18n_node                       1.x-1.0.0-beta6
i18n_path                       1.x-1.0.0-beta6
i18n_redirect                   1.x-1.0.0-beta6
i18n_select                     1.x-1.0.0-beta6
i18n_string                     1.x-1.0.0-beta6
i18n_sync                       1.x-1.0.0-beta6
i18n_taxonomy                   1.x-1.0.0-beta6
i18n_translation                1.x-1.0.0-beta6
languageicons                   1.x-1.1
module_filter                   1.x-2.2.2
nivo_slider                     1.x-3.0.1
seo_meta                        1.x-1.0.16
shield                          1.x-1.3.1
smtp                            1.x-1.7.3
token_help                      1.x-1.1.3
xmlsitemap                      1.x-1.0.11
xmlsitemap_custom               1.x-1.0.11
xmlsitemap_engines              1.x-1.0.11
xmlsitemap_menu                 1.x-1.0.11
xmlsitemap_node                 1.x-1.0.11
xmlsitemap_taxonomy             1.x-1.0.11

Other
-----
copyright_notice                -
imce                            -

 

indigoxela's picture

Hi ToniTen and amilenkov,

a redirect loop after 1.32 (and 1.31.1) sounds alarming.

I'm trying to reproduce, but can't, yet. Probably I need additional steps. What I tried so far:

  • Set up multilingual site, 2 languages, the default one has path prefix "", English has "en"
  • Create content in English (content is translatable)
  • Translate it to the other language

I can access both pages without problems. Is i18n required to reproduce the problem? How? You both have i18n_redirect (submodule) turned on?

indigoxela, I couldn't get to this earlier - I was out of the office. Now I'll make a copy of an existing multilingual site on a domain that I'm not currently using, on shared hosting, I'll make a few updates to 1.32 and tests, with and without i18n, and I'll report back.

Hi, indigoxela

I made a copy of a small multilingual site with i18n on a test domain. The site is currently running Backdrop 1.31.0 and everything works fine.

The site has i18n_redirect installed.

I'm ready to upgrade to 1.32.0, but I'll wait to see if you can advise me on any changes to make before upgrading or send you additional information.

The test site is installed on a domain (and hosting) different from the main production site. I just have this domain and I'm not using it for anything else at the moment, so I'm testing with it.

https://goobg.eu/

indigoxela's picture

Hi amilenkov,

many thanks for taking the time to identify the problem.

It's actually me, who needs advice (how to reproduce). ;-)

If it's not too much effort... run the update and check with i18n_redirect turned on and off, whether the site shows the same problem. Or if all pages show the problem, or just specific ones.

It's still a bit puzzling, how those redirect loops pop up. For me i18n doesn't break anything, either. So, let's try to narrow it step by step...

Hi indigoxela,

Here are the results of the tests done, sorry for the delay, I didn't have time.

Start of tests. The site is in core version 1.31.0

This website has 15 pages with the main / primary Bulgarian language, all of them have been translated into English. The site is not an upgrade from Drupal 7, it was developed from scratch with Backdrop in 2023.

I am updating the core to 1.32.0 via admin/config/system/updates

Update manager
Status message
Update was completed successfully. Your site has been taken out of maintenance mode.
Dismiss
backdrop

Installed backdrop successfully

Pre-update backup – done ok

3 pending updates
system module
• 1103 - Create system.extensions config and populate with enabled modules and themes.
date module
• 1003 - Update datestamp field schema to use 'big' integers.
views module
• 1008 - Update all grid Views to use the backwards-compatible unresponsive option.

Apply Pending Updates

Backdrop site update

Updates were attempted. If you see no failures below, you may proceed happily back to your site. Otherwise, you may need to update your database manually. All errors have been logged.

Recent log messages – no messages since the update

I visit the Bulgarian homepage – it reads without errors or problems

I select English from the language selector

The English homepage reads without problems (it was created using the Frontpage Multilingual module)

I select Bulgarian again via the language selector.

The Bulgarian homepage opens without problems

I select the English version of the homepage using the available translation flag at the end of the text (a class=“translation link)”

The homepage switches to English without problems

I select the Bulgarian homepage in the same way – using the available translation flag at the end of the text.

The site switches to Bulgarian without problems

I select an internal “About us” page in Bulgarian.

It opens without problems.

I switch to English using the language selector.

Error:

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.

I go back again.

The About us page reads normally in Bulgarian.

I switch to the English translation using the flag icon at the end of the text:

Error

The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
• This problem can sometimes be caused by disabling or refusing to accept cookies.

I select the home page again and test with other pages (except the main one – frontpage) – all pages are readable in Bulgarian but the English translations cannot be accessed either through the language selector or through the flag icon for available translation, only the home page (front page) works, it allows switching from one language to another without problems.

There is not a single error message in admin/reports/dblog!!! (I deleted the logs before starting the tests)

admin/modules

I disable Translation redirect (i18n)

I clear all caches

When trying to read the English version of the About Us page, the same error message is still displayed:

Page /en/our-team

The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
• This problem can sometimes be caused by disabling or refusing to accept cookies.
This error is valid for all pages on the site, including the contact page – created via Contact Form (not node).

I disable Redirect

The same error continues to appear when trying to access the English translations of the pages.

I disable Global Redirect

THE ERROR STOPS DISPLAYING

The English translations of the pages are available again!

I'm stopping here because I have no idea what else to do. I'll continue with the tests if instructed.

 

indigoxela's picture

Hi amilenkov,

no need to excuse, we all have day jobs. ;-)

Your thorough investigation is actually super helpful! Thank you so much for taking the time.

It has to do with the Global Redirect (contrib) module.

Now a question to ToniTen: do you also have Global Redirect enabled?

Yes I have it enabled. Sorry I was busy with other issues on other PHP apps, I wish I could have replied before.

amilenkov: Thanks a lot for investigating this!

Are the faulty links to the translated pages found in a menu, or inside the Body field (or another long text field)?

Could one of you open an issue in the main Backdrop issue queue

Thanks! I didn't start an issue myself because I wasn't sure if it was a config issue on my side, so I thought I would rather post it on the forum until I could see if others had similar issues or if I could properly find the cause.