1

Currently using Sitecore 10.2 XM version, when clicking on the folder tab on folder item there is an error showing as below.

enter image description here

Attaching log stack trace

 ManagedPoolThread #8 20:22:56 INFO  Job started: Index_Update_IndexName=Coveo_master_index
ManagedPoolThread #8 20:22:56 ERROR Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
   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)

Nested Exception

Exception: System.ArgumentNullException
Message: Precondition failed: The parameter 'p_Communication' must not be null
Parameter name: p_Communication
Source: Coveo.Framework
   at Coveo.Framework.CNL.Precondition.NotNull(Object p_Parameter, String p_ParameterName)
   at Coveo.SearchProvider.AbstractProviderUpdateContext..ctor(ISearchIndexSummary p_IndexSummary, IIndexCommunication p_Communication)
   at Coveo.SearchProvider.ProviderUpdateContext..ctor(ISearchIndex p_Index, IIndexCommunication p_Communication)
   at Coveo.SearchProvider.ProviderIndex.CreateUpdateContext()
   at Coveo.SearchProvider.ProviderIndex.Update(IEnumerable`1 p_IndexableInfo)

Any suggestions here, to fix the issue?

3
  • is it an upgrade? seems like some files are missing Jul 11, 2023 at 13:39
  • See if there is anything suspicious in the log. Replace the image with an error log if you found anything. Jul 11, 2023 at 13:53
  • This issue is occurring post upgrade and Updated the log trace for the same. Jul 11, 2023 at 14:56

2 Answers 2

2

I had the same issue and found the solution, at least on my instance.

I followed what Dean mentioned in his answer, and I had all that in place but it still didn't work. Then I remembered some time ago there was a Sitecore Support package, where we had to manually delete xaml handlers from Sitecore.config. We were supposed to do it only on CD, but we did it on CM as well by accident.

So all I did was add back the custom handlers on CM's Sitecore.config:

<customHandlers>
    ...
    <handler trigger="-/xaml/" handler="sitecore_xaml.ashx"/>
    <handler trigger="~/xaml/" handler="sitecore_xaml.ashx"/>
    ...
</customHandlers>
1
  • Yeah I have found the solution but forgot to update here. After adding the xaml entries it has started working. Nov 14, 2023 at 13:51
3

It would seem that you might be missing the file Folder.xaml.xml after your upgrade.

I did some digging and it seems that the configuration that defines which control to launch when clicking Folder tab is defined here (in core database):

/sitecore/content/Applications/Content Editor/Editors/Items/Folder

enter image description here

This in turn calls a url with a /~xaml/ handler. The xaml handler calls the Sitecore.Web.UI.XamlSharp.Xaml.XamlPageHandlerFactory class which searches for the control.

The /App_Config/XamlSharp.config defines where to look for the control in the sources/source/watchers node:

<source type="Sitecore.Web.UI.XamlSharp.Xaml.XamlFileControlSource,Sitecore.Kernel">
  <watchers hint="list:AddWatcher">
    <watcher type="Sitecore.Web.UI.XamlSharp.Xaml.XamlFileWatcher,Sitecore.Kernel">
      <folder>/sitecore/shell/Applications</folder>
      <filter>*.xaml.xml</filter>
      <codefilter>*.xaml.xml.cs</codefilter>
      <includesubdirectories>true</includesubdirectories>
    </watcher>
  </watchers>
</source>

With that information, you can then locate the specifc file that is being referenced Folder.xaml.xml, which you can find in this folder: sitecore\shell\Applications\Content Manager\Editors\Folder

Please check that this file is present in your system

If that does not resolve your issue, please review the definition item in the core database and confirm it is as shown in my image.

Useful reference relating regarding XAML Handler: https://www.markvanaalst.com/blog/daily-tip/using-xaml-controls-outside-the-sitecore-folder/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.