WordPress Trac: Ticket #23429: undefined tinyMCE: no ?> at the end of load-scripts.phphttps://core.trac.wordpress.org/ticket/23429
<p>
I noticed a theme throwing an error in console today. I noticed "Uncaught ReferenceError: tinyMCE"
</p>
<p>
In particular, switchEditors.switchto() and a few others like .do - where undefined. I thought that was strange. I googled the error and eventually found this thread: <a class="ext-link" href="http://wordpress.org/support/topic/javascript-error-in-admin-panel-with-load-scriptsphp?replies=2"><span class="icon">​</span>http://wordpress.org/support/topic/javascript-error-in-admin-panel-with-load-scriptsphp?replies=2</a>
</p>
<p>
Adding ?&gt; to the end of load-scripts.php fixed the issue.
</p>
<p>
Very strange bug. I have seen it on 2 installations now (4 referencing the two in the support forum thread) - but I am unable to recreate it anywhere else.
</p>
en-usWordPress Trachttps://core.trac.wordpress.org/chrome/site/your_project_logo.pnghttps://core.trac.wordpress.org/ticket/23429
Trac 1.0.1ocean90Sat, 09 Feb 2013 08:48:28 GMTkeywords, severity changedhttps://core.trac.wordpress.org/ticket/23429#comment:1
https://core.trac.wordpress.org/ticket/23429#comment:1
<ul>
<li><strong>keywords</strong>
<em>reporter-feedback</em> added; <em>ui-feedback</em> <em>ux-feedback</em> removed
</li>
<li><strong>severity</strong>
changed from <em>trivial</em> to <em>normal</em>
</li>
</ul>
<p>
Any plugins active? Can you reproduce it on a clean install with the default theme?
</p>
<p>
There seems to be an issue with unexpected output, which could be come from a PHP warning.
</p>
<p>
The missing ?&gt; is intentional, see <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12307" title="defect (bug): files missing closing php tags (closed: fixed)">#12307</a>.
</p>
TicketazaozzSat, 09 Feb 2013 21:13:39 GMThttps://core.trac.wordpress.org/ticket/23429#comment:2
https://core.trac.wordpress.org/ticket/23429#comment:2
<p>
Perhaps check for UTF BOM or empty spaces at the beginning of the theme's files. A BOM at the beginning of JS file can also cause errors if the encoding in the browser is not set to UTF-8.
</p>
Ticketchaos1Tue, 12 Feb 2013 20:21:53 GMThttps://core.trac.wordpress.org/ticket/23429#comment:3
https://core.trac.wordpress.org/ticket/23429#comment:3
<p>
@Ocean90 I am seeing the issue arise again with with the ?&gt; - I assume that it's not that.
</p>
<p>
I have disabled all plugins on the questionable sites. I see the issues again today. I found a thread on WordPress.StackExchange.com
</p>
<p>
<a class="ext-link" href="http://wordpress.stackexchange.com/questions/38048/editor-doesnt-load-properly-on-my-self-hosted-wordpress-3-3"><span class="icon">​</span>http://wordpress.stackexchange.com/questions/38048/editor-doesnt-load-properly-on-my-self-hosted-wordpress-3-3</a>
</p>
<p>
In that thread in particular, he is dealing with similar issue. Temporary solution is to use CONCATENATE_SCRIPTS in wp-config.php
</p>
<p>
define('CONCATENATE_SCRIPTS', false );
</p>
<p>
Before using CONCATENATE_SCRIPTS I read through the Troubleshooting WordPress 3.5 Master List: <a class="ext-link" href="http://wordpress.org/support/topic/troubleshooting-wordpress-35-master-list"><span class="icon">​</span>http://wordpress.org/support/topic/troubleshooting-wordpress-35-master-list</a>
</p>
<p>
I reinstalled 3.5.1 and cleared WP Super Cache - even made sure WP Super Cache was disabled network wide to see if the issue still existed.
</p>
<p>
Continuing to see the issue, I tried CONCATENATE_SCRIPTS and it resolves the issue.
</p>
<p>
Any suggestions?
</p>
TicketSergeyBiryukovThu, 14 Feb 2013 03:47:40 GMThttps://core.trac.wordpress.org/ticket/23429#comment:4
https://core.trac.wordpress.org/ticket/23429#comment:4
<p>
If the issue is concatenation/compression, I would try to compare the HTTP headers and the concatenated scripts returned on a problem server with the ones on other hosts.
</p>
TicketnacinSun, 19 Jan 2014 05:41:05 GMTstatus changed; resolution set; milestone deletedhttps://core.trac.wordpress.org/ticket/23429#comment:5
https://core.trac.wordpress.org/ticket/23429#comment:5
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>worksforme</em>
</li>
<li><strong>milestone</strong>
<em>Awaiting Review</em> deleted
</li>
</ul>
Ticket