コンテンツを複製するために、Umbraco の作成コンテキスト メニュー項目を調整しました。私は小さな問題の分類に取り組んできましたが、今は立ち往生しています。dialogHandler_temp.Create()
メソッドを使用しようとすると、 NullReferenceException
.
使用されるすべての変数は null ではなく、ページでもありません。これをどのように並べ替えることができるか考えている人はいますか?
private void DoCreation()
{
if (!Page.IsValid)
return;
var hel = helper.Request("nodeType");
var nType = int.Parse(nodeType.SelectedValue);
var nId = int.Parse(Request["nodeID"]);
var rName = rename.Text;
var cur = Current;
if (cur != null) // dialogHandler_temp.Create() is a static method
cur.ClientTools.ChangeContentFrameUrl(dialogHandler_temp.Create(hel, nType, nId, rName)).CloseModalWindow();
}
スタックトレース:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +278
OptionalMultiLangPage.DoCreation() in c:\inetpub\wwwAmaris\optional_multiLang.aspx.cs:112
OptionalMultiLangPage.SbmtClick(Object sender, EventArgs e) in c:\inetpub\wwwAmaris\optional_multiLang.aspx.cs:96
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3803