[wp-trac] [WordPress Trac] #13726: thickbox.js relative image paths break on children pages
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 4 13:44:22 UTC 2010
#13726: thickbox.js relative image paths break on children pages
--------------------------+-------------------------------------------------
Reporter: layotte | Owner: azaozz
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: JavaScript | Version: 3.0
Severity: normal | Keywords: thickbox
--------------------------+-------------------------------------------------
I originally found this little bug when trying to implement thickbox in
WPMU on a page in a subsite, it also affects WP as well for child pages.
Currrently in thickbox.js the images are relatively assigned this way
(line 9 & 12):
tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";
I'm enqueueing WordPress' thickbox in my theme's function.php:
wp_enqueue_script( 'thickbox', '', 'jquery', '', true );
wp_enqueue_style( 'thickbox' );
Here is an example of the issue, the images work fine on:
http://trunk.lewayotte.com/thickbox/
But not on:
http://trunk.lewayotte.com/thickbox/tb_child/
For my needs, I am able to remove the ".." for the relative path, however
that will break it for users whose WP installation is not in the root
directory of their site.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13726>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list