Opened 12 years ago
Closed 11 years ago
#23429 closed defect (bug) (worksforme)
undefined tinyMCE: no ?> at the end of load-scripts.php
Reported by: | chaos1 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | General | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
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: http://wordpress.org/support/topic/javascript-error-in-admin-panel-with-load-scriptsphp?replies=2
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
@
12 years ago
- Keywords reporter-feedback added; ui-feedback ux-feedback removed
- Severity changed from trivial to normal
#2
@
12 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
@
12 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 WordPress.StackExchange.com
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: http://wordpress.org/support/topic/troubleshooting-wordpress-35-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?
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.