You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I restore content that contains a block list with a block that has an "Umbraco.TrueFalse" property, I get the following error message when visit the restored node.
Cannot assign value "False" of type "System.String" to property "{property alias}" expecting type "System.Int32".
Note this is only an issue for true/false properties inside a block list (and possibly a block grid). True/false properties directly on content nodes transfer as expected. Likely cause is that the block list isn't converting the block data inside it before transferring the data. Error happens in this case because the property isn't set to 0 or 1.
Reproduction
Create a doc type that is an element type with an "Umbraco.TrueFalse" property.
Add that doc type as a block to a new block list data type.
Add the block list to another doc type.
Deploy these changes to another environment (in my case I deployed to Umbraco Cloud).
Create a content node in the environment created in step 5 with the doc type created in step 3. Make sure to create a couple items in the block list.
Save and publish that node.
Go back to the first environment and do a partial restore targeting the newly created node in the other environment.
Visit the newly created node and you should see the error.
Specifics
Umbraco: 13.6.0 Umbraco Deploy: 13.4.0
Here is the full stack trace of the error.
System.InvalidOperationException, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Cannot assign value "False" of type "System.String" to property "conditionsUseAndLogic" expecting type "System.Int32".
at Umbraco.Cms.Core.Models.Property.ThrowTypeException(Object value, Type expected, String alias)
at Umbraco.Cms.Core.Models.Property.TryConvertAssignedValue(Object value, Boolean throwOnError, Object& converted)
at Umbraco.Cms.Core.PropertyEditors.BlockValuePropertyValueEditorBase.MapBlockItemDataToEditor(IProperty property, List1 items) at Umbraco.Cms.Core.PropertyEditors.BlockEditorPropertyValueEditor.ToEditor(IProperty property, String culture, String segment) at Umbraco.Cms.Core.Models.Mapping.ContentPropertyBasicMapper1.Map(IProperty property, TDestination dest, MapperContext context)
at Umbraco.Cms.Core.Models.Mapping.ContentPropertyDisplayMapper.Map(IProperty originalProp, ContentPropertyDisplay dest, MapperContext context)
at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context)
at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TSource,TTarget](TSource source, MapperContext context)
at System.Linq.Enumerable.SelectIPartitionIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.ToList()
at Umbraco.Cms.Core.Models.Mapping.TabsAndPropertiesMapper1.Map(TSource source, MapperContext context) at Umbraco.Cms.Web.BackOffice.Mapping.ContentMapDefinition.Map(IContent source, ContentVariantDisplay target, MapperContext context) at Umbraco.Cms.Web.BackOffice.Mapping.ContentMapDefinition.Map(IContent source, ContentVariantScheduleDisplay target, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) at Umbraco.Cms.Core.Models.Mapping.ContentVariantMapper.Map[TVariant](IContent source, MapperContext context) at Umbraco.Cms.Web.BackOffice.Mapping.ContentMapDefinition.Map[TVariant](IContent source, ContentItemDisplay1 target, MapperContext context)
at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context)
at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context)
at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.MapToDisplayWithSchedule(IContent content)
at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.GetById(Int32 id)
at lambda_method354(Closure, Object, Object[])
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
A brief description of the issue goes here.
When I restore content that contains a block list with a block that has an "Umbraco.TrueFalse" property, I get the following error message when visit the restored node.
Note this is only an issue for true/false properties inside a block list (and possibly a block grid). True/false properties directly on content nodes transfer as expected. Likely cause is that the block list isn't converting the block data inside it before transferring the data. Error happens in this case because the property isn't set to 0 or 1.
Reproduction
Specifics
Umbraco: 13.6.0
Umbraco Deploy: 13.4.0
Here is the full stack trace of the error.
The text was updated successfully, but these errors were encountered: