Skip to content

Could not create new data type (operation status: InvalidConfiguration) #282

@bjarnef

Description

@bjarnef

In a clean Umbraco 16.2 project on Umbraco Cloud and Deploy 16.0.1, I am trying if I can update schemas from an Umbraco 13 project, which some very basic content types and datatypes configured instead of manually creating these.

However we have a special button picker property editor, which I need to adjust, but much simiar to color picker configuration (I compared with how the "items" in Appoved Color Picker on save is generated:
https://github.com/umbraco/Umbraco-CMS/blob/main/src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs#L11-L12

However when I click "Update Umbraco schema" button I get this in deploy.log:

EXCEPTION
Umbraco.Deploy.Core.Exceptions.ProcessArtifactException: Process pass #0 failed for artifact umb://data-type/01dd7a05575c42dba853421a6aa85642.
 ---> System.InvalidOperationException: Could not create new data type (operation status: InvalidConfiguration).
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.DataTypeConnector.ProcessAsync(ArtifactDeployState`2 state, IDeployContext context, Int32 pass, CancellationToken cancellationToken)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ServiceConnectorBase`4.Umbraco.Cms.Core.Deploy.IServiceConnector.ProcessAsync(ArtifactDeployState state, IDeployContext context, Int32 pass, CancellationToken cancellationToken)
   at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.ProcessArtifactsAsync(IEnumerable`1 artifactsWithOptions, String ownerEmail, IDeployContext context, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.ProcessArtifactsAsync(IEnumerable`1 artifactsWithOptions, String ownerEmail, IDeployContext context, CancellationToken cancellationToken)
   at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.ProcessPackageAsync(Guid sessionId, Package package, CancellationToken cancellationToken)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.DiskReadWorkItem.ProceedAsync(List`1 artifacts, Manifest manifest, CancellationToken cancellationToken)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.DiskReadWorkItem.ExecuteAsyncSub(IWorkContext context, List`1 resume, CancellationToken cancellationToken)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.DiskReadWorkItem.ExecuteAsync(IWorkContext context, CancellationToken cancellationToken)

The error in dashboard isn't very useful (and should probably ensure it doesn't overflow viewport, but has scroll inside wrapper).
Image

The configuration of umb://data-type/01dd7a05575c42dba853421a6aa85642.

I tried adding "EditorUiAlias" (although the UI doesn't exist yet) and removed the old "Alias" property (which was just blank).

{
  "Name": "Vertical Alignment",
  "EditorAlias": "MCB.Umbraco.ButtonPicker",
  "EditorUiAlias": "MCB.PropertyEditorUi.ButtonPicker",
  "DatabaseType": "Nvarchar",
  "Configuration": {
    "multiple": false,
    "defaultValue": "Top",
    "buttons": [
      {
        "value": "Top"
      },
      {
        "value": "Center"
      },
      {
        "value": "Bottom"
      }
    ],
    "size": "medium",
    "showIcons": false
  },
  "Parent": "umb://data-type-container/ea846f023db349f8a3cb4bb1e108fd78",
  "Udi": "umb://data-type/01dd7a05575c42dba853421a6aa85642",
  "Dependencies": [
    {
      "Udi": "umb://data-type-container/ea846f023db349f8a3cb4bb1e108fd78",
      "Ordering": true
    }
  ],
  "__type": "Umbraco.Deploy.Infrastructure,Umbraco.Deploy.Infrastructure.Artifacts.DataTypeArtifact",
  "__version": "13.4.0"
}

The configuration of the property editor:

public class ButtonPickerConfiguration
{
    [ConfigurationField("multiple")]
    public bool Multiple { get; set; }

    [ConfigurationField("defaultValue")]
    public string? DefaultValue { get; set; }

    [ConfigurationField("buttons")]
    public List<ValueListItem> Buttons { get; set; } = new();

    [ConfigurationField("size")]
    public string? Size { get; set; }

    [ConfigurationField("showIcons")]
    public bool ShowIcons { get; set; }

    public class ValueListItem
    {
        public required string Value { get; set; }

        public string? Label { get; set; }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions