abpframework / abpframework/abp
Volo.Docs module encounter an ERR_TOO_MANY_REDIRECTS error when the defaultUICulture not in `AbpLocalizationOptions` languages list
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14.4k
- Forks
- 3.7k
- Avg merge
- 15h 32m
- Merged PRs (30d)
- 106
Description
- ABP Framework version 3.0.4.
- User Interface MVC
- ABP Module Volo.Docs
- Browser Version Chrome V84
I installed the module Volo.Docs and just want zh-Hans LanguageInfo, so i didn't add en and others LanguageInfo.
private void ConfigureLocalizationServices()
{
Configure<AbpLocalizationOptions>(options =>
{
var resource = options.Resources
.Get<KnowledgePayResource>()
.AddBaseTypes(typeof(AbpUiResource));
//options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
//options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
});
}
When i visit a github repo doc project, an ERR_TOO_MANY_REDIRECTS error was encountered.
It redirect betwwen /documents/en/abp/latest/ and /Abp/Languages/Switch?culture=en&uiCulture=en&returnUrl=/documents/en/abp/latest/ endlessly.

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Volo.Docs and the ConfigureLocalizationServices setup using AbpLocalizationOptions, then reproduce the redirect between /documents/en/abp/latest/ and /Abp/Languages/Switch. Trace how the default UI culture is handled when en is absent from the configured languages; done means visiting a document does not enter an endless redirect loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100