Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content transfers of content with the grid editor fail #149

Closed
RyuLindow opened this issue Dec 6, 2022 · 2 comments
Closed

Content transfers of content with the grid editor fail #149

RyuLindow opened this issue Dec 6, 2022 · 2 comments

Comments

@RyuLindow
Copy link

Bug summary

The Starter Kit has been updated to use the block grid instead of grid.

Transferring content that uses the Block Grid editor results in an error listed below.

After removing the block grid editors locally and deploying that over to the target env I was able to transfer the content.

Specifics

    <PackageReference Include="Umbraco.Cloud.Identity.Cms" Version="11.0.18" />
    <PackageReference Include="Umbraco.Cloud.StorageProviders.AzureBlob" Version="11.0.0" />
    <PackageReference Include="Umbraco.Cms" Version="11.0.0" />
    <PackageReference Include="Umbraco.Deploy.Cloud" Version="11.0.0" />
    <PackageReference Include="Umbraco.Deploy.Contrib" Version="11.0.0" />
    <PackageReference Include="Umbraco.Deploy.Forms" Version="11.0.0" />
    <PackageReference Include="Umbraco.Forms" Version="11.0.0" />

Steps to reproduce

create a v11 Cloud project
clone to local
install the starter kit
push to dev
transfer content

Expected result

Transfer works

Actual result

Transfer fails with

System.ArgumentNullException: Value cannot be null. (Parameter 'first')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Concat[TSource](IEnumerable`1 first, IEnumerable`1 second)
   at Umbraco.Deploy.Contrib.ValueConnectors.BlockEditorValueConnector.ToArtifact(Object value, IPropertyType propertyType, ICollection`1 dependencies, IContextCache contextCache)
   at Umbraco.Cms.Core.Deploy.ValueConnectorExtensions.ToArtifact(IValueConnector connector, Object value, IPropertyType propertyType, ICollection`1 dependencies, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ContentConnector.ContentConnectorBase`2.SerializeNonVariantValue(ICollection`1 dependencies, Boolean published, IDictionary`2 propertyCollection, IProperty property, IValueConnector valueConnector, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ContentConnector.ContentConnectorBase`2.AddProperty(IProperty property, ICollection`1 dependencies, Boolean published, IDictionary`2 propertyCollection, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ContentConnector.ContentConnectorBase`2.MapArtifactProperties(IPropertyCollection properties, ICollection`1 dependencies, Boolean published, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ContentConnector.DocumentConnectorBase.MapVersion(IContent content, ICollection`1 dependencies, Boolean published, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ContentConnector.DocumentConnector.GetArtifact(GuidUdi udi, IContent content, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ContentConnector.DocumentConnector.GetArtifact(GuidUdi udi, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Connectors.ServiceConnectors.ServiceConnectorBase`3.Umbraco.Cms.Core.Deploy.IServiceConnector2.GetArtifact(Udi udi, IContextCache contextCache)
   at Umbraco.Cms.Core.Deploy.ServiceConnectorExtensions.GetArtifact(IServiceConnector connector, Udi udi, IContextCache contextCache)
   at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.GetSignatures(IEnumerable`1 udis, IContextCache contextCache, CancellationToken token)
   at Umbraco.Deploy.Infrastructure.Environments.CurrentEnvironment.CreateManifestAsync(Guid sessionId, IEnumerable`1 items, IEnumerable`1 exclude, CancellationToken token)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.DeployRestoreWorkItemBase.CreateManifestOnSource(IEnumerable`1 items, IEnumerable`1 exclude, Nullable`1 batchIndex, Nullable`1 numberOfBatches)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.SourceDeployWorkItem.ProceedToPackage(IEnumerable`1 items, Nullable`1 batchIndex, Nullable`1 numberOfBatches)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.SourceDeployWorkItem.ExecuteAsyncSub(IEnumerable`1 items, Nullable`1 batchIndex, Nullable`1 numberOfBatches, CancellationToken token)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.SourceDeployWorkItem.ExecuteAsyncSub(IEnumerable`1 items, Nullable`1 batchIndex, Nullable`1 numberOfBatches, CancellationToken token)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.SourceDeployWorkItem.ExecuteForItems(IEnumerable`1 items, Nullable`1 batchIndex, Nullable`1 numberOfBatches, CancellationToken token)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.SourceDeployWorkItem.ExecuteForItems(IEnumerable`1 items, CancellationToken token)
   at Umbraco.Deploy.Infrastructure.Work.WorkItems.SourceDeployWorkItem.ExecuteAsync(IWorkContext context, CancellationToken token)
@AndyButland
Copy link

AndyButland commented Dec 7, 2022

I believe this is only an issue when using the Umbraco starter kit due to some of the default content in that populating data for the block grid fields with JSON from the legacy grid editor. So I've created an issue on the tracker for the product to resolve in there.

The workaround is to save the content locally first before deploying.

We will though make an update to the connector here to be more defensive in parsing the input it receives, such that we can avoid this issue in future. Will require an update to Umbraco.Deploy.Contrib.

@AndyButland
Copy link

This is resolved for the next patch release of Deploy.Contrib (10.1.1 and 11.0.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants