'fixes' an issue where you can get any property value back due to the incorrect cache key being used
This commit is contained in:
@@ -20,7 +20,11 @@ namespace Umbraco.Core.Collections
|
||||
public CompositeStringStringKey(string key1, string key2)
|
||||
{
|
||||
_key1 = key1?.ToLowerInvariant() ?? "NULL";
|
||||
_key2 = key2?.ToLowerInvariant() ?? "NULL";
|
||||
|
||||
//fixme - we are changing this to null if it is an empty string, this is because if we don't do this than this key will not match
|
||||
// anything see comments http://issues.umbraco.org/issue/U4-11227#comment=67-46399
|
||||
// since we're not dealing with segments right now and I just need to get something working, this is the 'fix'
|
||||
_key2 = !key2.IsNullOrWhiteSpace() ? key2.ToLowerInvariant() : "NULL";
|
||||
}
|
||||
|
||||
public bool Equals(CompositeStringStringKey other)
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
using System;
|
||||
//using System;
|
||||
|
||||
namespace Umbraco.Core.Models.PublishedContent
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a ThreadStatic-based implementation of <see cref="IVariationContextAccessor"/>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>Something must set the current context.</para>
|
||||
/// </remarks>
|
||||
public class ThreadStaticVariationContextAccessor : IVariationContextAccessor
|
||||
{
|
||||
[ThreadStatic]
|
||||
private static VariationContext _context;
|
||||
//namespace Umbraco.Core.Models.PublishedContent
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// Provides a ThreadStatic-based implementation of <see cref="IVariationContextAccessor"/>.
|
||||
// /// </summary>
|
||||
// /// <remarks>
|
||||
// /// <para>Something must set the current context.</para>
|
||||
// /// </remarks>
|
||||
// public class ThreadStaticVariationContextAccessor : IVariationContextAccessor
|
||||
// {
|
||||
// [ThreadStatic]
|
||||
// private static VariationContext _context;
|
||||
|
||||
/// <inheritdoc />
|
||||
public VariationContext VariationContext
|
||||
{
|
||||
get => _context;
|
||||
set => _context = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
// /// <inheritdoc />
|
||||
// public VariationContext VariationContext
|
||||
// {
|
||||
// get => _context;
|
||||
// set => _context = value;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -1075,7 +1075,6 @@ namespace Umbraco.Core.Services.Implement
|
||||
//we need to unpublish everything if this is a mandatory language
|
||||
var unpublishAll = _languageRepository.GetMany().Where(x => x.Mandatory).Select(x => x.IsoCode).Contains(culture, StringComparer.InvariantCultureIgnoreCase);
|
||||
|
||||
//fixme - this needs to be changed when 11227 is merged!
|
||||
content.ClearPublishedValues(culture, segment);
|
||||
//now we just publish with the name cleared
|
||||
SaveAndPublish(content, userId);
|
||||
|
||||
Reference in New Issue
Block a user