diff --git a/src/Umbraco.Web/PropertyEditors/DropDownMultiplePropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DropDownMultiplePropertyEditor.cs
index 43091b547a..8c94d3bd47 100644
--- a/src/Umbraco.Web/PropertyEditors/DropDownMultiplePropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/DropDownMultiplePropertyEditor.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Web.PropertyEditors
/// Due to maintaining backwards compatibility this data type stores the value as a string which is a comma separated value of the
/// ids of the individual items so we have logic in here to deal with that.
///
- [DataEditor(Constants.PropertyEditors.Aliases.DropDownListMultiple, "Dropdown list multiple", "dropdown", Group = "lists", Icon="icon-bulleted-list", IsDeprecated = true)]
+ [DataEditor(Constants.PropertyEditors.Aliases.DropDownListMultiple, "(Obsolete) Dropdown list multiple", "dropdown", Group = "lists", Icon="icon-bulleted-list", IsDeprecated = true)]
public class DropDownMultiplePropertyEditor : DropDownMultipleWithKeysPropertyEditor
{
///
diff --git a/src/Umbraco.Web/PropertyEditors/DropDownMultipleWithKeysPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DropDownMultipleWithKeysPropertyEditor.cs
index 8b0759ea70..831fb3a56a 100644
--- a/src/Umbraco.Web/PropertyEditors/DropDownMultipleWithKeysPropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/DropDownMultipleWithKeysPropertyEditor.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Web.PropertyEditors
/// Due to backwards compatibility, this editor stores the value as a CSV string listing
/// the ids of individual items.
///
- [DataEditor(Constants.PropertyEditors.Aliases.DropdownlistMultiplePublishKeys, "Dropdown list multiple, publish keys", "dropdown", Group = "lists", Icon = "icon-bulleted-list", IsDeprecated = true)]
+ [DataEditor(Constants.PropertyEditors.Aliases.DropdownlistMultiplePublishKeys, "(Obsolete) Dropdown list multiple, publish keys", "dropdown", Group = "lists", Icon = "icon-bulleted-list", IsDeprecated = true)]
public class DropDownMultipleWithKeysPropertyEditor : DropDownPropertyEditor
{
private readonly ILocalizedTextService _textService;
diff --git a/src/Umbraco.Web/PropertyEditors/DropDownPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DropDownPropertyEditor.cs
index b3d687d196..4603adbf08 100644
--- a/src/Umbraco.Web/PropertyEditors/DropDownPropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/DropDownPropertyEditor.cs
@@ -18,7 +18,7 @@ namespace Umbraco.Web.PropertyEditors
/// as INT and we have logic in here to ensure it is formatted correctly including ensuring that the string value is published
/// in cache and not the int ID.
///
- [DataEditor(Constants.PropertyEditors.Aliases.DropDownList, "Dropdown list", "dropdown", ValueType = ValueTypes.String, Group = "lists", Icon = "icon-indent", IsDeprecated = true)]
+ [DataEditor(Constants.PropertyEditors.Aliases.DropDownList, "(Obsolete) Dropdown list", "dropdown", ValueType = ValueTypes.String, Group = "lists", Icon = "icon-indent", IsDeprecated = true)]
public class DropDownPropertyEditor : DropDownWithKeysPropertyEditor
{
///
diff --git a/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs
index 2a21860d71..29ea1234f1 100644
--- a/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/DropDownWithKeysPropertyEditor.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Web.PropertyEditors
/// as INT and we have logic in here to ensure it is formatted correctly including ensuring that the INT ID value is published
/// in cache and not the string value.
///
- [DataEditor(Constants.PropertyEditors.Aliases.DropdownlistPublishKeys, "Dropdown list, publishing keys", "dropdown", ValueType = ValueTypes.Integer, Group = "lists", Icon = "icon-indent", IsDeprecated = true)]
+ [DataEditor(Constants.PropertyEditors.Aliases.DropdownlistPublishKeys, "(Obsolete) Dropdown list, publishing keys", "dropdown", ValueType = ValueTypes.Integer, Group = "lists", Icon = "icon-indent", IsDeprecated = true)]
public class DropDownWithKeysPropertyEditor : DataEditor
{
private readonly ILocalizedTextService _textService;
diff --git a/src/Umbraco.Web/PropertyEditors/Grid2PropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/Grid2PropertyEditor.cs
index 791fe8031b..cc39e7af36 100644
--- a/src/Umbraco.Web/PropertyEditors/Grid2PropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/Grid2PropertyEditor.cs
@@ -18,91 +18,91 @@ namespace Umbraco.Web.PropertyEditors
///
/// Represents a grid property and parameter editor.
///
- [DataEditor(Constants.PropertyEditors.Aliases.Grid2, "Grid", "grid", HideLabel = true, ValueType = ValueTypes.Json, Group="rich content", Icon="icon-layout")]
+ [DataEditor(Constants.PropertyEditors.Aliases.Grid2, "Grid", "grid2", HideLabel = true, ValueType = ValueTypes.Json, Group="rich content", Icon="icon-layout")]
public class Grid2PropertyEditor : DataEditor
{
public Grid2PropertyEditor(ILogger logger)
: base(logger)
{ }
- internal void DocumentWriting(object sender, Examine.LuceneEngine.DocumentWritingEventArgs e)
- {
- foreach (var value in e.ValueSet.Values)
- {
- //if there is a value, it's a string and it's detected as json
- if (value.Value.Count > 0 && value.Value[0] != null && (value.Value[0] is string firstVal) && firstVal.DetectIsJson())
- {
- try
- {
- //TODO: We should deserialize this to Umbraco.Core.Models.GridValue instead of doing the below
- var json = JsonConvert.DeserializeObject(firstVal);
+ //internal void DocumentWriting(object sender, Examine.LuceneEngine.DocumentWritingEventArgs e)
+ //{
+ // foreach (var value in e.ValueSet.Values)
+ // {
+ // //if there is a value, it's a string and it's detected as json
+ // if (value.Value.Count > 0 && value.Value[0] != null && (value.Value[0] is string firstVal) && firstVal.DetectIsJson())
+ // {
+ // try
+ // {
+ // //TODO: We should deserialize this to Umbraco.Core.Models.GridValue instead of doing the below
+ // var json = JsonConvert.DeserializeObject(firstVal);
- //check if this is formatted for grid json
- if (json.HasValues && json.TryGetValue("name", out _) && json.TryGetValue("sections", out _))
- {
- //get all values and put them into a single field (using JsonPath)
- var sb = new StringBuilder();
- foreach (var row in json.SelectTokens("$.sections[*].rows[*]"))
- {
- var rowName = row["name"].Value();
- var areaVals = row.SelectTokens("$.areas[*].controls[*].value");
+ // //check if this is formatted for grid json
+ // if (json.HasValues && json.TryGetValue("name", out _) && json.TryGetValue("sections", out _))
+ // {
+ // //get all values and put them into a single field (using JsonPath)
+ // var sb = new StringBuilder();
+ // foreach (var row in json.SelectTokens("$.sections[*].rows[*]"))
+ // {
+ // var rowName = row["name"].Value();
+ // var areaVals = row.SelectTokens("$.areas[*].controls[*].value");
- foreach (var areaVal in areaVals)
- {
- //TODO: If it's not a string, then it's a json formatted value -
- // we cannot really index this in a smart way since it could be 'anything'
- if (areaVal.Type == JTokenType.String)
- {
- var str = areaVal.Value();
- str = XmlHelper.CouldItBeXml(str) ? str.StripHtml() : str;
- sb.Append(str);
- sb.Append(" ");
+ // foreach (var areaVal in areaVals)
+ // {
+ // //TODO: If it's not a string, then it's a json formatted value -
+ // // we cannot really index this in a smart way since it could be 'anything'
+ // if (areaVal.Type == JTokenType.String)
+ // {
+ // var str = areaVal.Value();
+ // str = XmlHelper.CouldItBeXml(str) ? str.StripHtml() : str;
+ // sb.Append(str);
+ // sb.Append(" ");
- //add the row name as an individual field
- e.Document.Add(
- new Field(
- $"{value.Key}.{rowName}", str, Field.Store.YES, Field.Index.ANALYZED));
- }
+ // //add the row name as an individual field
+ // e.Document.Add(
+ // new Field(
+ // $"{value.Key}.{rowName}", str, Field.Store.YES, Field.Index.ANALYZED));
+ // }
- }
- }
+ // }
+ // }
- if (sb.Length > 0)
- {
- //First save the raw value to a raw field
- e.Document.Add(
- new Field(
- $"{UmbracoExamineIndexer.RawFieldPrefix}{value.Key}",
- firstVal, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS, Field.TermVector.NO));
+ // if (sb.Length > 0)
+ // {
+ // //First save the raw value to a raw field
+ // e.Document.Add(
+ // new Field(
+ // $"{UmbracoExamineIndexer.RawFieldPrefix}{value.Key}",
+ // firstVal, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS, Field.TermVector.NO));
- //now replace the original value with the combined/cleaned value
- e.Document.RemoveField(value.Key);
- e.Document.Add(
- new Field(
- value.Key,
- sb.ToString(), Field.Store.YES, Field.Index.ANALYZED));
- }
- }
- }
- catch (InvalidCastException)
- {
- //swallow...on purpose, there's a chance that this isn't the json format we are looking for
- // and we don't want that to affect the website.
- }
- catch (JsonException)
- {
- //swallow...on purpose, there's a chance that this isn't json and we don't want that to affect
- // the website.
- }
- catch (ArgumentException)
- {
- //swallow on purpose to prevent this error:
- // Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject.
- }
- }
+ // //now replace the original value with the combined/cleaned value
+ // e.Document.RemoveField(value.Key);
+ // e.Document.Add(
+ // new Field(
+ // value.Key,
+ // sb.ToString(), Field.Store.YES, Field.Index.ANALYZED));
+ // }
+ // }
+ // }
+ // catch (InvalidCastException)
+ // {
+ // //swallow...on purpose, there's a chance that this isn't the json format we are looking for
+ // // and we don't want that to affect the website.
+ // }
+ // catch (JsonException)
+ // {
+ // //swallow...on purpose, there's a chance that this isn't json and we don't want that to affect
+ // // the website.
+ // }
+ // catch (ArgumentException)
+ // {
+ // //swallow on purpose to prevent this error:
+ // // Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject.
+ // }
+ // }
- }
- }
+ // }
+ //}
///
/// Overridden to ensure that the value is validated
diff --git a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
index 0f3211b743..3b6a691c43 100644
--- a/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
+++ b/src/Umbraco.Web/PropertyEditors/GridPropertyEditor.cs
@@ -18,7 +18,7 @@ namespace Umbraco.Web.PropertyEditors
///
/// Represents a grid property and parameter editor.
///
- [DataEditor(Constants.PropertyEditors.Aliases.Grid, "Grid layout", "grid", HideLabel = true, ValueType = ValueTypes.Json, Group="rich content", Icon="icon-layout")]
+ [DataEditor(Constants.PropertyEditors.Aliases.Grid, "(Obsolete) Grid layout", "grid", HideLabel = true, ValueType = ValueTypes.Json, Group="rich content", Icon="icon-layout", IsDeprecated = true)]
public class GridPropertyEditor : DataEditor
{
public GridPropertyEditor(ILogger logger)