Clear Cache and remove mculture from the url if the last non-default language is deleted
This commit is contained in:
@@ -225,8 +225,10 @@ function navigationService($routeParams, $location, $q, $injector, eventsService
|
||||
retainQueryStrings: function (currRouteParams, nextRouteParams) {
|
||||
var toRetain = angular.copy(nextRouteParams);
|
||||
var updated = false;
|
||||
|
||||
_.each(retainedQueryStrings, function (r) {
|
||||
if (currRouteParams[r] && !nextRouteParams[r]) {
|
||||
// if mculture is set to null in nextRouteParams, the value will be undefined and we will not retain any query string that has a value of "null"
|
||||
if (currRouteParams[r] && nextRouteParams[r] !== undefined && !nextRouteParams[r]) {
|
||||
toRetain[r] = currRouteParams[r];
|
||||
updated = true;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace Umbraco.Web.Cache
|
||||
ClearAllIsolatedCacheByEntityType<ILanguage>();
|
||||
//if a language is removed, then all dictionary cache needs to be removed
|
||||
ClearAllIsolatedCacheByEntityType<IDictionaryItem>();
|
||||
// clear since each IContent contains a reference to a string culture
|
||||
ClearAllIsolatedCacheByEntityType<IContent>();
|
||||
RefreshDomains(id);
|
||||
base.Remove(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user