I've created a package of media items on my prod environment and installed it on my local. The media files are NOT stored in the file system

enter image description here

But when I install the package, the items are created but no media is attached

enter image description here

EDIT: I get this error on installation. It's occurring on packageinstall:items:ended so I'm not sure if it's related:

ERROR One or more exceptions occurred while processing the subscribers to the 'packageinstall:items:ended' event.
Exception[1]: System.NullReferenceException 
Message[1]: Object reference not set to an instance of an object. 
Source[1]: Sitecore.ContentSearch 
   at Sitecore.ContentSearch.SitecoreItemCrawler.IsExcludedFromIndex(SitecoreIndexableItem indexable, Boolean checkLocation)
   at Sitecore.ContentSearch.SitecoreItemCrawler.GetContextIndexRanking(IIndexable indexable)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.Min(IEnumerable`1 source)
   at Sitecore.ContentSearch.AbstractSearchIndex.Sitecore.ContentSearch.Pipelines.GetContextIndex.IContextIndexRankable.GetContextIndexRanking(IIndexable indexable)
   at Sitecore.ContentSearch.Pipelines.GetContextIndex.FetchIndex.c__DisplayClass6_0.b__0(ISearchIndex i)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.d__1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Sitecore.ContentSearch.Pipelines.GetContextIndex.FetchIndex.GetContextIndex(IIndexable indexable, GetContextIndexArgs args)
   at Sitecore.ContentSearch.Pipelines.GetContextIndex.FetchIndex.Process(GetContextIndexArgs 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.Abstractions.CorePipelineWrapper.Run(String pipelineName, PipelineArgs args)
   at Sitecore.ContentSearch.Pipelines.GetContextIndex.GetContextIndexPipeline.Run(ICorePipeline pipeline, GetContextIndexArgs args)
   at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.GroupedEnumerable`3.GetEnumerator()
   at Sitecore.ContentSearch.Events.PackagingEventHandler.HandleInstalledItems(List`1 installedItems)
   at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result) 
  • I have a hunch but not enough of a hunch to actually give it as an answer yet. But what happens if you install the package twice? Yes, exact same operation again. Just the installation, no need to create the package again.
    – Mark Cassidy
    Sep 22 '20 at 13:53
  • I've tried running the installation multiple times Sep 22 '20 at 14:03
  • Any error in the logs while the package installs?
    – Chris Auer
    Sep 22 '20 at 14:05
  • Yes, I do have errors. It's occurring on package:install:end so I didn't think it would be related, but I've added it to the body Sep 22 '20 at 14:09
  • 1
    try to comment Sitecore.ContentSearch.Events.PackagingEventHandler, Sitecore.ContentSearch, and then install package and see if you can see changes Sep 22 '20 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.