Sitecore version 10.1 has an issue with the item publication when a media library item doesn’t have a blob image attached as shown below.
The complete stack trace of the error is this one:
Job started: Publish to 'web'|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sitecore.Framework.Data.Blobs.Abstractions.BlobProviderException: No supported provider for is configured.
at Sitecore.Framework.Data.Blobs.BlobStorage.GetBlobProvider[T](BlobIdentifier identifier)
at Sitecore.Publishing.PublishHelper.CopyBlobField(Field sourceField, Item targetVersion)
at Sitecore.Publishing.PublishHelper.CopyBlobFields(Item sourceVersion, Item targetVersion)
at Sitecore.Publishing.PublishHelper.TransformToTargetVersion(Item sourceVersion)
at Sitecore.Publishing.PublishHelper.CopyToTarget(Item sourceVersion, Item originalItem)
at Sitecore.Publishing.PublishHelper.PublishVersionToTarget(Item sourceVersion, Item targetItem, Boolean targetCreated)
at Sitecore.Publishing.PublishHelper.PublishVersion(Item sourceVersion)
at Sitecore.Publishing.Pipelines.PublishItem.PerformAction.Process(PublishItemContext context)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Publishing.Pipelines.PublishItem.PublishItemPipeline.Run(PublishItemContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context, List`1& referrers, List`1& children)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessPublishingCandidate(PublishingCandidate entry, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.Process(PublishContext context)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Publishing.Pipelines.Publish.PublishPipeline.Run(PublishContext context)
at Sitecore.Publishing.Publisher.PublishWithResult()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj)
at Sitecore.Jobs.JobRunner.RunMethod(JobArgs args)
at (Object , Object )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
at Sitecore.Jobs.DefaultJob.DoExecute()
at Sitecore.Abstractions.BaseJob.ThreadEntry(Object state)
Hopefully, I found this blog that gives me some clues to fix the issue. The following query gets the media items with the blob field as null.
select ItemId
from SharedFields
where FieldId like '40E50ED9-BA07-4702-992E-A912738D32DC'
and Value=''
union
select ItemId
from SharedFields
inner join [dbo].[Blobs] b on SharedFields.value = '{' + cast(b.BlobId as varchar(36)) + '}'
where FieldId like '40E50ED9-BA07-4702-992E-A912738D32DC'
and blobid is null
union
select itemid
FROM [dbo].[Fields] s
inner join [dbo].[Blobs] b on s.value = '{' + cast(b.BlobId as varchar(36)) + '}'
where s.fieldid = '{DBBE7D99-1388-4357-BB34-AD71EDF18ED3}' and blobid is null
union
select itemid
FROM [dbo].[Fields] s
where s.fieldid = '{DBBE7D99-1388-4357-BB34-AD71EDF18ED3}' and Value=''
Once the media library items with this problem have been identified with the previous query, you might attach the media file or delete them from the CMS.
To attach the media from the CMS use the option “Attach” to browse and upload the file.
Sitecore has already created this bug with the number 490149. I will see you next time.