title: Dojo Errors Post-AMD Conversion
body: <p>Having made a bunch of general javascripts AMD compatible, i'm running into some errors which are blocking progress:</p>
  
  <ul>
  <li>TypeError: registry.byId(...) is undefined</li>
  <li>TypeError: _3ff is null (also _3f9)</li>
  </ul>
  
  <p>Tracing the error "registry.byId()" leads to domConstruct.place(...), and errors like "_3ff is null" seems to point to the line "domConstruct.place(content, dom.byId($parent));" suggesting that the Id required isn't available.... although the modules are all including "dojo/domReady!".</p>
  
  <p>'dojo/dom-construct' is a listed dependency of the module, and domConstruct variable has been created.</p>
  
  <p>As an example, one of the starting points for this kind of error is a <code>&lt;td&gt;</code>:</p>
  
  <pre><code>content += '&lt;td valign="middle" nowrap="nowrap" id="somethingBlahMessages"&gt;';
  // calls a function in another module where a &lt;div&gt; is created and filled
  // see below
  setTimeout(require('js/somethingMessages').somethingMessagesInit(), 1);
  content += '&lt;/td&gt;';
  
  // function from another module to create div and fill with data 
  var content = '';
  content += '&lt;div id="somethingMessages"&gt;&lt;/div&gt;';
  
  domConstruct.place(content, dom.byId('somethingBlahMessages'));     
  // fetch the data, functions down the line also use domConstruct.place/empty
  somethingMessagesTimer = setTimeout(that.somethingMessagesGet(), 1);
  </code></pre>
  
  <p>The content which ought to be added to the td#somethingBlahMessages isn't getting there. Is this a parsing issue?</p>
  
  <p>This all used to work fine the non-AMD way, so i'm also suspicious that it's a red-herring, and the real error is cunningly disguised under branches and twigs and i've walked right past it....</p>
  
  <p><strong>EDIT:</strong> I tried converting only one of my scripts into an AMD module, and in doing so it fails with a "_3f9 is null" TypeError immediately when it encounters a domConstruct.place (the stack trace ends at the place function).</p>