WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 3 months 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)

comment:1 ocean9015 months 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.

comment:2 azaozz15 months 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.

comment:3 chaos115 months 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

http://wordpress.stackexchange.com/questions/38048/editor-doesnt-load-properly-on-my-self-hosted-wordpress-3-3

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?

comment:4 SergeyBiryukov14 months 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.

comment:5 nacin3 months ago

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