WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#15510 closed defect (bug) (fixed)

Thickbox images can't be loaded in network admin

Reported by: ocean90 Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Network Admin Keywords: has-patch
Focuses: multisite Cc:

Description

The reason is:

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";
}

Image link for network admin => wp.local/wp-admin/wp-includes/js/thickbox/tb-close.png

See also #6453.

Attachments (2)

15510.patch (815 bytes) - added by ocean90 3 years ago.
15510.2.patch (1.2 KB) - added by ocean90 3 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 nacin3 years ago

Where are we using thickbox in the network admin?

If we are, then we should define those variables and inject them into the head when we need it. (That's the purpose of the check, which was added by us into TB.)

comment:2 ocean903 years ago

Theme preview or plugin (upgrade) infos are usin thickbox.

ocean903 years ago

comment:3 ocean903 years ago

  • Keywords has-patch added; needs-patch removed

comment:4 follow-up: nacin3 years ago

Can the add_action() be put directly into add_thickbox if is_network_admin()? Seems cleaner.

ocean903 years ago

comment:5 in reply to: ↑ 4 ocean903 years ago

Replying to nacin:

Can the add_action() be put directly into add_thickbox if is_network_admin()? Seems cleaner.

Sure, why not. Patch attached.

comment:6 nacin3 years ago

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

(In [16963]) Plugin install and thickbox for the network admin. props ocean90, fixes #15510, fixes #15750.

Note: See TracTickets for help on using tickets.