title: TinyMCE error after upgrading to Umbraco 6
body: <p>I just upgraded from Umbraco 4.7.1 to 6.1.6</p>
  
  <p>I have a TinyMCE control in my custom section. It stopped working after the upgrade.<br>Here is part of my code for the page in the custom section:</p>
  
  <pre><code>public partial class MyCustomPage : UmbracoEnsuredPage
  {
    private TinyMCE txtLongDesc;
  
    protected UmbracoPanel UmbPanel { get { return Web.FindControlRecursive(Master, "umpContent") as UmbracoPanel; } }
  
    protected override void Page_Init(object sender, EventArgs e)
    {
      base.Page_Init(sender, e);
  
      PutTinyMce(ref txtLongDesc, "txtLongDesc", phLongDesc, UmbPanel);
    }
  
    public static void PutTinyMce(ref TinyMCE control, string controlId, PlaceHolder placeHolder, UmbracoPanel panel)
    {
      DataTypeDefinition d = DataTypeDefinition.GetDataTypeDefinition(2710); // My custom TinyMCE DataType
  
      control = (umbraco.editorControls.tinyMCE3.TinyMCE)d.DataType.DataEditor;
      control.ID = controlId;
      placeHolder.Controls.Add(control);
      panel.Menu.NewElement("div", "umbTinymceMenu_" + control.ClientID, "tinymceMenuBar", 0); // Add TinyMCE controls to menu bar
    }
  }
  </code></pre>
  
  <p>When the page is rendered, the textarea is hidden, but the TinyMCE is not shown.<br>This is the JavaScript error I got:</p>
  
  <blockquote>
    <p>TypeError: document.getElementById(...) is null @
    .../umbraco/plugins/tinymce3/tinymce3tinymceCompress.aspx?rnd=00000000-0000-0000-0000-000000000000&amp;module=gzipmodule&amp;themes=umbraco&amp;plugins=contextmenu,umbracoimg,paste,inlinepopups,table,umbracocss,advlink,umbracoembed,spellchecker,noneditable,umbracomacro,umbracopaste,umbracolink,umbracocontextmenu&amp;languages=en:19803</p>
  </blockquote>
  
  <p>This is the line causing the error (line 19803)</p>
  
  <pre><code>document.getElementById(ed.getParam("umbraco_toolbar_id", "*")).appendChild(c);
  </code></pre>
  
  <p>Has anyone experienced this problem? Any idea how to fix it?</p>