Bugfixes..

- ModelsBuilder: Inject PublishedValueFallback into static Mixins
- ModelsBuilder: Throw exception if compiler can't compile the code
- CheckIfUserTicketDataIsStaleAttribute: Scope issue
- Ambiguous Actions: Couldn't determine the action when empty arrays was passed. Fixed by using more v8 like solution. (Still stupid the client not just have different endpoints)
- Fixed issue with reading the body from post requests. Often we where not allowed to seek in the stream.
- UmbracoHelper: Made available on UmbracoViewPage
- Client entity.resource.js: Don't ask server when getByIds has 0 ids.
- Client content.resource.js: Renamed endpoint GetEmptyBlueprint to avoid ambiguous action name
This commit is contained in:
Bjarke Berg
2021-01-29 10:30:28 +01:00
parent 04058fb9c6
commit 14284b64c2
27 changed files with 454 additions and 303 deletions

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Umbraco.Core.Configuration;
using Umbraco.Core.Configuration.Models;
namespace Umbraco.ModelsBuilder.Embedded.Building
@@ -254,7 +253,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
sb.AppendFormat(" {0} => ",
property.ClrName);
WriteNonGenericClrType(sb, GetModelsNamespace() + "." + mixinClrName);
sb.AppendFormat(".{0}(this);\n",
sb.AppendFormat(".{0}(this, _publishedValueFallback);\n",
MixinStaticGetterName(property.ClrName));
}
@@ -311,7 +310,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
{
sb.Append("\t\tpublic ");
WriteClrType(sb, property.ClrTypeName);
sb.AppendFormat(" {0} => {1}(this);\n",
sb.AppendFormat(" {0} => {1}(this, _publishedValueFallback);\n",
property.ClrName, MixinStaticGetterName(property.ClrName));
}
else
@@ -351,7 +350,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
WriteGeneratedCodeAttribute(sb, "\t\t");
sb.Append("\t\tpublic static ");
WriteClrType(sb, property.ClrTypeName);
sb.AppendFormat(" {0}(I{1} that) => that.Value",
sb.AppendFormat(" {0}(I{1} that, IPublishedValueFallback publishedValueFallback) => that.Value",
mixinStaticGetterName, mixinClrName);
if (property.ModelClrType != typeof(object))
{
@@ -359,7 +358,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
WriteClrType(sb, property.ClrTypeName);
sb.Append(">");
}
sb.AppendFormat("(\"{0}\");\n",
sb.AppendFormat("(publishedValueFallback, \"{0}\");\n",
property.Alias);
}