Opened 15 years ago
Closed 15 years ago
#13726 closed defect (bug) (duplicate)
thickbox.js relative image paths break on children pages
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | JavaScript | Keywords: | thickbox |
Focuses: | Cc: |
Description
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.
Thickbox working on Parent Page