[wp-trac] [WordPress Trac] #17050: Built in Thickbox close image relative path error

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 5 00:16:48 UTC 2011


#17050: Built in Thickbox close image relative path error
--------------------------------+-----------------------------
 Reporter:  maorb               |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  External Libraries  |    Version:  3.1
 Severity:  normal              |   Keywords:
--------------------------------+-----------------------------
 When using the built in Thickbox modal window on the frontned, the link to
 the close image is a relative path to - .'''./wp-includes/js/thickbox/tb-
 close.png'''

 This making the icon not appear if user is on an inside page of the site,
 since the relative path is no longer correct.

 The file contains this is wp-includes/js/thickbox/thickbox.js

 Lines 8-13 are these:


 {{{
 if ( typeof tb_pathToImage != 'string' ) {
         var tb_pathToImage = "../wp-
 includes/js/thickbox/loadingAnimation.gif";
 }
 if ( typeof tb_closeImage != 'string' ) {
         var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";
 }
 }}}

 When replaced with relative path to root and not to parent directory, it
 is working well and fixes this error --


 {{{
 if ( typeof tb_pathToImage != 'string' ) {
         var tb_pathToImage = "/wp-
 includes/js/thickbox/loadingAnimation.gif";
 }
 if ( typeof tb_closeImage != 'string' ) {
         var tb_closeImage = "/wp-includes/js/thickbox/tb-close.png";
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17050>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list