title: TinyMCE 404/undefined
body: <p>I am using TinyMCE with Twitter Bootstrap v3.1 in a Q/A application. </p>
  
  <p>For some reason I am getting multiple 404 errors from TinyMCE in console:</p>
  
  <pre><code>GET http://localhost/assets/lib/TinyMCE/themes/modern/themeundefined.js 404 (Not Found) tinymce.min.js:3
  Failed to load: /assets/lib/TinyMCE//themes/modern/themeundefined.js 
  </code></pre>
  
  <p>As far as I can see the path is correct. I have typed the path directly into the browser bar (without undefinedtheme.js) and it pops up.</p>
  
  <p>Full path to TinyMCE is: <code>http://localhost/application/assets/lib/TinyMCE/</code></p>
  
  <ol>
  <li>I have mod-rewrite enabled, I have tried disabling but didn't help.</li>
  <li>I have tried setting:
  <ul>
  <li><code>tinyMCE.baseURL = "/assets/lib/TinyMCE";</code></li>
  <li><code>tinyMCE.baseURL = "/application/assets/lib/TinyMCE";</code></li>
  <li><code>tinyMCE.baseURL = "localhost/application/assets/lib/TinyMCE";</code></li>
  </ul></li>
  </ol>
  
  <p>I have searched the TinyMCE FAQ for the issue which pointed me to mod_rewrite.</p>
  
  <p>Basically what has caused the <code>undefinedtheme.js</code> thing?</p>
  
  <p><strong>My TinyMCE Initiator:</strong></p>
  
  <pre><code>//TinyMCE Initiator
  
  //set scope
  $(document).ready(function() {
  
      tinyMCE.baseURL = "/assets/lib/TinyMCE";
  
      tinymce.init({
          selector: "textarea#tinymce",
          theme: "modern",
          /*width: 400,*/
          height: 300,
          plugins: [
               "advlist autolink link lists charmap print preview hr anchor pagebreak spellchecker",
               "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime nonbreaking",
               "save contextmenu directionality emoticons template paste textcolor"
         ],
         content_css: "../assets/css/bootstrap.css",
         toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify bullist numlist forecolor | outdent indent | l      ink | ", 
         style_formats: [
              {title: 'Bold text', inline: 'b'},
              {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
              {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
              {title: 'Example 1', inline: 'span', classes: 'example1'},
              {title: 'Example 2', inline: 'span', classes: 'example2'},
              {title: 'Table styles'},
              {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
          ]
      }); 
  
  });
  </code></pre>