Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#29811 closed defect (bug) (fixed)

visual tab tinyMCE theme.min.js has no version number causing cache issue

Reported by: sethmatics's profile sethmatics Owned by:
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords:
Focuses: javascript, administration Cc:

Description

https://wordpress.org/support/topic/visual-editor-not-working-after-upgrade-to-40/page/2?replies=39#post-6068433

Per our topic, tons of people are having caching issues after upgrading to version 4.0 because this file is being cached (for 1 reason or another) causing the visual editor to crash 1/2 way through loading. Its particularly bad because unless you go back and forth between the text editor and the visual editor you can't really see the error. The most notable way of seeing the error is to add a "read more" from the tinyMCE button. The graphic does not display in tinyMCE but you can switch and see the comment in the text editor.

A perhaps video that was too long, it originally had audio with me talking but my system music was too loud so I wiped the audio track.
https://www.youtube.com/watch?v=8R5hcH3wno8

Attachments (1)

wordpress-4-tinymce-visual-tab-error-graphic1.jpg (317.0 KB) - added by sethmatics 9 years ago.
console preview when js caching issue occurs

Download all attachments as: .zip

Change History (6)

@sethmatics
9 years ago

console preview when js caching issue occurs

#1 @sethmatics
9 years ago

I forgot to mention, its being cached becuase its being loaded without a version number in the querystring. All the other JS files I saw had version numbers appended, except for this one.

#2 @azaozz
9 years ago

In production this shouldn't make a difference. All of the TinyMCE JS files are loaded in one concatenated and compressed file, wp-tinymce.js.gz through wp-tinymce.php. This also speeds up the page loading quite a bit.

However if you have define( 'SCRIPT_DEBUG', true ) or define( 'CONCATENATE_SCRIPTS', false ), TinyMCE itself will load these files. As of version 4.0 TinyMCE doesn't support appending a version (query string) to the URLs when auto-loading its components. Nearly all caching proxies and CDNs seem to handle this properly. Can request for this to be added back but most likely it will be available when upgrading to WordPress 4.1.

#3 @sethmatics
9 years ago

Really bazaar. All our tinymce buttons failed to load until a full Cloudflare Cache purge was done. Doing this across hundreds of sites is a bandwidth killer. Thanks for taking a look, we must have one of these settings defined because its loading theme.min.js on the fly when you click the "visual" tab. Are you 100% sure that it doesn't always execute the loading of that file when switching between text and visual tabs? I tested this issue on 2 completely seperate Multisite networks, both had the same caching issue with that file.

#4 @azaozz
9 years ago

  • Component changed from Editor to TinyMCE
  • Milestone changed from Awaiting Review to 4.1

This was fixed upstream earlier today: https://github.com/tinymce/tinymce/commit/efa6cd8eaf08. Will be in 4.1 when we update TinyMCE.

#5 @azaozz
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [29994].

Note: See TracTickets for help on using tickets.