SXAページをJSONデバイスで開くとエラーが発生する


説明

JSSをインストールせずにSitecore Experience Accelerator(SXA)を使用し、JSONデバイスでページを開くと下記のエラーが発生する可能性があります。

Could not find method: Process. Pipeline: /sitecore[database="SqlServer" xmlns:patch="http://www.sitecore.net/xmlconfig/"]/pipelines/group[groupName="layoutService" patch:source="Sitecore.XA.Feature.LayoutServices.Integration.config"]/pipelines/renderJsonRendering[performanceCritical="true" patch:source="Sitecore.LayoutService.config"]/processor

解決策

JSSをインストールすると、「type」パラメーターが追加されます。JSSがインストールされていない場合、SXAはJSSとの互換性のために「type」パラメータを含まない空の<processor>ノードを<renderJsonRendering>パイプラインに追加します。

この問題を解決するには、Sitecore XPインスタンスをSitecore XP 10.0およびSXA10.0.0またはそれ以降のバージョンにアップグレードします。

別の解決策としては、空の<processor>ノードの削除を行う設定パッチ ファイルを\App_Config\Include\zzzフォルダ内に作成してください。

例:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<group groupName="layoutService">
<pipelines>
<renderJsonRendering>
<processor>
<!-- Delete Empty Processor: -->
<patch:delete />
<!-- This line to get engine to identify proper node to delete -->
<AllowedConfigurations hint="list"></AllowedConfigurations>
</processor>
</renderJsonRendering>
</pipelines>
</group>
</pipelines>
</sitecore>
</configuration>