-
-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Copy of internal report:
Steps to reproduce:
-
In XM Cloud, set the SITECORE_SPE_ELEVATION environment variable to
Allow
-
Navigate to
Desktop > Powershell Console
-
Run the Publish-Item command:
Publish-Item -Path master:\content\home -Target experienceedge
Actual results:
Following error occurs and publish failed:
Publish-Item : Stack is null or empty.
At line:1 char:1
+ Publish-Item -Path master:\content\home -Target experienceedge
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Publish-Item], InvalidOperationException
+ FullyQualifiedErrorId : System.InvalidOperationException,Spe.Commands.Data.PublishItemCommand
Failing code - introduced to edge @01.07.2025
public virtual void Process(PublishContext context){
// [...] logic
if (context.Job.TryResolveOptions(new PublishLog(_log), out _, out var options))
{
// [...] logic
}
else
{
throw new InvalidOperationException("Failed to resolve publishing options for the job.");
}
// [...] logic
}
Expected results:
Publish succeeded.
Additional info:
I've been told that:
Since sitecore 6.4 the right way to initiate a publish is to use PublishManager:
https://archive.doc.sitecore.com/xp/en/SdnArchive/upload/sitecore6/64/content_api_cookbook_sc64_and_later-a4.pdf
section: 2.2 How to Publish
Also it looks like the current implementation of SpePublishManager allows parallel publish jobs (because it skips creation of standard publish jobs) which is incorrect and can cause issues on edge side.