I am trying to add aan SXA module on a site node. Right click-click site node > Scripts > Add site modolemodule. I am getting the below error in SPE logs.
19528 00:27:22 INFO Script item set to master:\system\Modules\PowerShell\Script Library\SXA\SXA - Scaffolding\Content Editor\Context Menu\Add Site Module in ScriptSession $scriptSession$|pei2g11lvrnhjedgzo3cee5x|8c329f12-7dfd-4d4e-9846-2220e4aa8130.
ManagedPoolThread #12 00:27:24 ERROR You cannot call a method on a null-valued expression.
19528 00:27:22 INFO Script item set to master:\system\Modules\PowerShell\Script Library\SXA\SXA - Scaffolding\Content Editor\Context Menu\Add Site Module in ScriptSession $scriptSession$|pei2g11lvrnhjedgzo3cee5x|8c329f12-7dfd-4d4e-9846-2220e4aa8130.
ManagedPoolThread #12 00:27:24 ERROR You cannot call a method on a null-valued expression.
I tried to debug the script - /sitecore/system/Modules/PowerShell/Script Library/SXA/SXA - Scaffolding/Content Editor/Context Menu/Add Site Module/sitecore/system/Modules/PowerShell/Script Library/SXA/SXA - Scaffolding/Content Editor/Context Menu/Add Site Module
By setting up the required context details as inputs.
Here, $SiteItem.Modules$SiteItem.Modules
is null because of which I suspect the actual error is coming.
QuestionsQuestions: From where this Modules information is coming or which item I could find this Modules information and why is it null?
- From where this Modules information is coming or which item I could find this Modules information and why is it null?
Any fix for this?