Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#23429 closed defect (bug) (worksforme)

undefined tinyMCE: no ?> at the end of load-scripts.php

Reported by: chaos1's profile chaos1 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: General Keywords: reporter-feedback
Focuses: Cc:


I noticed a theme throwing an error in console today. I noticed "Uncaught ReferenceError: tinyMCE"

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:

Adding ?> to the end of load-scripts.php fixed the issue.

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.

Change History (5)

#1 @ocean90
10 years ago

  • Keywords reporter-feedback added; ui-feedback ux-feedback removed
  • Severity changed from trivial to normal

Any plugins active? Can you reproduce it on a clean install with the default theme?

There seems to be an issue with unexpected output, which could be come from a PHP warning.

The missing ?> is intentional, see #12307.

#2 @azaozz
10 years ago

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.

#3 @chaos1
10 years ago

@Ocean90 I am seeing the issue arise again with with the ?> - I assume that it's not that.

I have disabled all plugins on the questionable sites. I see the issues again today. I found a thread on

In that thread in particular, he is dealing with similar issue. Temporary solution is to use CONCATENATE_SCRIPTS in wp-config.php

define('CONCATENATE_SCRIPTS', false );

Before using CONCATENATE_SCRIPTS I read through the Troubleshooting WordPress 3.5 Master List:

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.

Continuing to see the issue, I tried CONCATENATE_SCRIPTS and it resolves the issue.

Any suggestions?

#4 @SergeyBiryukov
10 years ago

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.

#5 @nacin
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.