You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when you open the public area the view locations are properly ordered from the ThemeableViewLocationExpander as the themeable locations are added first.
This way if you override the Home/Index view in the DefaultClean theme and try to visit the administration, you will end up with the Home page in the public area.
You can easily check if the AreaName is "Admin" and in this case add the Admin view locations first and also there is no need to add the Themeable view locations at all as the administration should not be themeable anyway (at least in 3.9 it wasn't).
Please note that almost every theme (except DefaultClean) overrides the Home/Index view.
Currently when you open the public area the view locations are properly ordered from the ThemeableViewLocationExpander as the themeable locations are added first.
"/Themes/DefaultClean/Views/{1}/{0}.cshtml"
"/Themes/DefaultClean/Views/Shared/{0}.cshtml"
"/Views/{1}/{0}.cshtml"
"/Views/Shared/{0}.cshtml"
But in the Admin are this is a problem as the Admin area locations should be first instead.
Now in the Admin are the locations are like this:
"/Themes/DefaultClean/Views/{1}/{0}.cshtml"
"/Themes/DefaultClean/Views/Shared/{0}.cshtml"
"/Areas/{2}/Views/{1}/{0}.cshtml"
"/Areas/{2}/Views/Shared/{0}.cshtml"
"/Views/Shared/{0}.cshtml"
This way if you override the Home/Index view in the DefaultClean theme and try to visit the administration, you will end up with the Home page in the public area.
You can easily check if the AreaName is "Admin" and in this case add the Admin view locations first and also there is no need to add the Themeable view locations at all as the administration should not be themeable anyway (at least in 3.9 it wasn't).
Please note that almost every theme (except DefaultClean) overrides the Home/Index view.
Source: https://www.nopcommerce.com/boards/t/48672/nopcommerce-40-bug-fixes-and-improvements.aspx#192807
The text was updated successfully, but these errors were encountered: