[wp-trac] [WordPress Trac] #27846: Removing query string from style link causes TinyMCE link button to display at bottom of page

WordPress Trac noreply at wordpress.org
Wed Apr 16 22:28:57 UTC 2014


#27846: Removing query string from style link causes TinyMCE link button to display
at bottom of page
----------------------------+-----------------------------
 Reporter:  Autumn Lansing  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  TinyMCE         |    Version:  3.9
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 I found an interesting bug with the new 3.9 release. There's a standard
 bit of code around the internet which lets you remove the query string
 from style and script links in the head so that they can be cached. The
 code is this:

 {{{
 function remove_wp_ver_css_js( $src ) {
   if ( strpos( $src, 'ver=' ) )
   $src = remove_query_arg( 'ver', $src );
   return $src;
 }
 }}}

 Using that code now breaks the pop-up window for TinyMCE's "link" button.
 The contents of that window instead display at the bottom of the page.
 This only happens when calling it to remove the query strings on styles,
 in this manner:

 {{{
 add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
 }}}

 Using it with "script_loader_src" instead of "style_loader_src" does not
 cause this bug.

 I know this code isn't part of core, but I'm assuming that the bug is an
 issue with TinyMCE.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27846>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list