Comments (11)
Here is a timeline showing where the sql to update the settings table is executed. The red line showing where the Logs.txt file shows a timestamp while executing "GetAll"
And this is the log file where I believe something is updating the setting for the user to 'null'
from aspnetboilerplate.
Related issue from the past #5399
from aspnetboilerplate.
I also think that this code should be checking the language is actually an allowed language from the list of AbpLanguages. If not, it can just assign any language to the user which may not be a supported language and instead should revert to the default.
Or, this code for setting the language, should just not exist at all.
from aspnetboilerplate.
I can recreate this bug now in a solid test case.
- For any user, switch to the default app language (so the AppSettings table will have no entry for their language).
- Go into incognito mode, sign in with that user.
Due to the above mentioned, it will create a 'null' entry in the AppSettings table.
from aspnetboilerplate.
Hi @ismcagdas
Regarding this: https://aspnetboilerplate.com/Pages/Documents/Localization#asp-net-core
AbpUserRequestCultureProvider (ABP's provider): If the user is known via IAbpSession and has explicitly selected a language before (and saved to ISettingManager), then use the user's preferred language. If the user is known but has not selected any language and the .AspNetCore.Culture cookie or header has a value, set the user's language setting with that information and use this value as the current language. If the user is unknown, this provider does nothing.
How does the system know if the user explicitly selected the application default language?
from aspnetboilerplate.
saved to ISettingManager
It must be saved to AbpSettings table.
from aspnetboilerplate.
How is that possible though? The system does not save it to the table if it is the same as the default app language.
from aspnetboilerplate.
When you get a setting value using setting manager, the default value is returned if there is no specific setting saved for that user.
from aspnetboilerplate.
Right, but if you try to set the language setting of a user to that of the app default, it does not go into the AbpSettings table.
from aspnetboilerplate.
Yes, in that case the setting will be retrieved from setting definition in code behind, not from database. By the way, I couldn't understand what is your point here.
from aspnetboilerplate.
So, if the setting is not stored, how does AbpUserRequestCultureProvider know that it should NOT change the users language?
If the user is known but has not selected any language
It is not a reliable way to know if the user has selected a language. If the app default language is en-US
then it cannot know if the user has selected no language or selected en-US
from aspnetboilerplate.
Related Issues (20)
- GetAllIncludingAsync is missing from the IRepository interface.
- Low efficiency of soft deletion HOT 3
- UnitOfWork and Async calls - Abp Version 7.0.0 HOT 10
- Clock.Provider not working in abp v9 HOT 6
- GetAll Readonly method to IRepository HOT 1
- There is no async implementation of the AbpHangfireAuthorizationFilter.
- Retrieval of permissions is only possible synchronously. HOT 1
- When changing the language to Arabic, the layout didn't change to RTL and is still as en lang. HOT 3
- Add missed GetDbContextAsync Extension
- Update NuGet packages to latest version
- Use GetAllAsync for asynchronous methods HOT 1
- Upgrade templates to 9.2
- [Vulnerability]Ignoring tenant filters can result in cross-tenant unauthorized authorization attacks HOT 1
- OrganizationUnit does not generate audit correctly HOT 1
- Error in login and register page HOT 3
- PermissionManager - GetAllPermissionsAsync: where conditions bug
- Interceptors not firing HOT 2
- MultiDbContext does not work with the Migrator project
- ABP v9.2.2 backend job caused the database connection to remain unreleased HOT 2
- Abp.AspNetCore 8.4.0 .Net 7 Detect vulnerabilities when scanning using Snyk HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnetboilerplate.