Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:20:14+00:00 2026-06-16T00:20:14+00:00

I have adapted the Umbraco create context menu item in order to duplicate content.

  • 0

I have adapted the Umbraco create context menu item in order to duplicate content. I have been working through it sorting small problems but I am now stuck. When trying to use the dialogHandler_temp.Create() method I am getting a NullReferenceException.

All of the variables used are not null nor is the page. Does anyone have an idea how I could sort this?

    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();
} 

Stack trace:

 [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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:20:15+00:00Added an answer on June 16, 2026 at 12:20 am

    I got this sorted. It took me a while to realise that helper.Request("nodeType") wasn’t to return the new node’s type, rather the xml node value of what is being done. This must be assigned somewhere out-with the the Umbraco Content class so I missed it. It should be set to the value of "content".

    My code now looks like:

     private void DoCreation()
        {
            if (!Page.IsValid)
                return;
    
            const string xmlNodeVal = "content";
            var nType = int.Parse(nodeType.SelectedValue);
            var nId = int.Parse(Request["nodeID"]);
            var rName = rename.Text;
            var returnUrl = dialogHandler_temp.Create(xmlNodeVal, nType, nId, rName);
            var cur = Current;
    
            if (cur != null)
                cur.ClientTools.ChangeContentFrameUrl(returnUrl).CloseModalWindow();
        } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working mic recording script in AS3 which I have been able
I have adapted a jQuery tabbed interface tutorial to create an interface for viewing
I have adapted my Content Query Web Part (CQWP) so it generates ul tags
I have adapted this code from another gentleman on SO. It's working great so
I have implemented the following code (adapted from the tutorial ) in order to
I have adapted some code from a great article I found about circle drawing
I have a simple java project (adapted from the example here ), which is
I have a project I am working on and it requires drill down UITableView.
I have created a UIScrollView in my app - adapted from this sample code:
I have a game made in cocos2d for iPhone, I've adapted for iPad and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.