Clear Cache and remove mculture from the url if the last non-default language is deleted

This commit is contained in:
elitsa
2019-10-11 15:40:55 +02:00
parent 016bed03ae
commit 175253a1a6
2 changed files with 5 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -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);
}